Hi @karanpradhan, I assume you mean a web link? If so, you should also be able to. But you need to update the Python code to take the input as a weblink. I will keep it on my notes to cover it in one of the videos
Hi, I am not sure I understood what you meant by stretched to fill. Do you mean it doesn’t fit in the pdf viewer? If so, you can use the zoom and scroll feature of this visual.
Hello! Great Tutorial! But I had a problem... When I pasted the base64 code to excel, it filled 152 lines instead of the 15, as in the video. What could I be doing wrong? Can someone give me a hand? Thanks!!!
Hi Victor. It seems that you have a big file with many pages, which means much bigger size. To over come this, divide the file up into pages and bring separate pages. Check this tutorial for more details: th-cam.com/video/dU_wgeuPE2g/w-d-xo.htmlsi=RsNraMf8cIRWMsSx
Great video! However, I realized that I can have up to 60 columns concatenated. There is still limitations from PBI, I assume: The function 'PLACEHOLDER' encountered a Text that exceeded the maximum allowable length. Are you aware of that or is not the best practice to do this?
Hello 👋, yes there is limitation. For long PDFs you need to divide them up into sections or pages. To get a better idea, check out the below tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Hi thanks Alot dear for this , I would like to know please if you can advise If I'll connect the pdf files with the main dashboard For e.g if I have a sales pie chart on the main dashboard and I'll click on it then sales details in pdf will open Please advise if there is an option for this , would really appreciate
Hello 👋, it is possible if you manage to link pages to your data. You need to develop a data model that against each row you have page reference. Check out this tutorial, it might give you some ideas: Embedding PDFs In Power BI: Visualize, Search & Highlight Techniques | NextGen BI Guru th-cam.com/video/J0nprINRsw8/w-d-xo.html
What an excellent question! I wish I’ve covered it in the video. Anyway, you can’t print the visual alone directly. However, you can put the visual in focus mode, from the top right corner of the visual. Then from file you can export it to PDF. Hope this workaround helps. Best of luck!
When finishing the calculated column, the following error message returns: The 'PLACEHOLDER' function found Text that exceeds the maximum allowed size.
Hello 👋🏼, it seems you are trying to embed big pdfs which means you have so many columns you are trying to combine. To overcome this you need to divide your pdfs to pages. But don’t worry, you don’t have to do this manually. The below tutorial has a script that will do this for you. Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Hi, Thank for the video. It work fine when PDF size is small like 4 page n so, but when pdf size increased to 30 page, converting it to base64 result value in column from a to ce length in excel. Later when command in power bi (BAse64pdf = ts[a] to ts[ce]) power give back error (Function 'PLACEHOLDER' encountered a Text that exceeds the maximum allowable length.) do you have any solution for this
Hello 👋, yes for large pdfs you need to divide it up. But there is always an easy and automated way to do it. Check out this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Such a useful capability that is hard to find anywhere on the web + a clear and concise walkthrough.. You're a legend, Thank You! One question is do you know if there is a limit to how many of the 32,000 character cells can be combined in a calculated column in BI. I am working with pdfs that can be 100+ pages and was wondering if you had a sense of if there was a limit.
Hello 👋🏼, thanks for your feedback! In your case you need to divide them into pages. Luckily you can automate it. Check out this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
When I run this .py script on a few of my PDF's I get a dump of errors, I have just copied in what I think are the important lines below. When I ran it using your sample PDF's the script worked, then I tried to manually convert one my existing PDF using Aspose utility, it threw an error. What could the Base64 routine be complaining about? I tried several PDF's and many of them showed same conversion error... is there a limit to the size of the PDF? When I did the Step #1 manual conversion my Base64 import has 317 columns! == Script Error === raise ValueError("dict contains fields not in fieldnames: " ValueError: dict contains fields not in fieldnames: 'B149', 'B139', 'B180', 'B32', 'B66', 'B42', 'B86', 'B153', 'B50'... goes on to 'B280' Thanks in advance. ** UPDATE ** I changed the .PY array range from (30) to range(325) and no errors, then imported to PBi but there unable to concate the columns as the CalcColumn will not generate more than 250 columns. Is there a workaround to display this large PDF?
Hello my friend. If you have huge pdf. Please follow this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
@@NextGenBIGuru I found this explanation. blog.crossjoin.co.uk/2019/05/17/maximum-length-text-value-power-bi/. It says that there is a limit of concatenate DAX Functions. Around 2.1 million characters. So i modified some of the lines of the original python code like this: with open(CSV_Dir, 'a',encoding="UTF8") as f: #add the PDF base64 code into the CSV file NRow = DictWriter(f, fieldnames=field_names, lineterminator = ' ') Data_={'Source':FName} count = 0 for j in range(int(len(my_string)/32000)+1):#break the base64 code into portions of 32000 charachters before saving them into the CSV file to avoid the characters length limitation Data_['B' + str(j)]=my_string[j*32000:(j+1)*32000] count += 1 characters = count*32000 if characters
@@NextGenBIGuru I found this explanation. blog.crossjoin.co.uk/2019/05/17/maximum-length-text-value-power-bi/. It says that there is a limit of concatenate DAX Functions. Around 2.1 million characters. So i modified some of the lines of the original python code like this: with open(CSV_Dir, 'a',encoding="UTF8") as f: #add the PDF base64 code into the CSV file NRow = DictWriter(f, fieldnames=field_names, lineterminator = ' ') Data_={'Source':FName} count = 0 for j in range(int(len(my_string)/32000)+1):#break the base64 code into portions of 32000 charachters before saving them into the CSV file to avoid the characters length limitation Data_['B' + str(j)]=my_string[j*32000:(j+1)*32000] count += 1 characters = count*32000 if characters
You now can encode base 64 right in Power Query and Power BI accommodates way more than 30k characters in the same column (2 tips right here), however from my experience visuals don't accept Base64 string over 30k characters - what is the trick here?
Hello 👋🏼, the issue is not with visuals not accepting more than limited number of characters. The limitation is with the PowerQuery that doesn’t accept more than 32k characters in one cell. To overcome this, you divide them into many columns then you create a DAX calculated column to join them.
@@NextGenBIGuru Power BI model can handle a million character fields now. 32k limit was removed last year I believe. Just try to import pretty large pdf and check number of characters (I added calculated column with Text.Length). This should immensely simplify handling of pdfs in Power BI (base64 inside Power Query + no need to split and merge columns) but it looks like there is another issue. I would suspect missing prefix for Base64 or quotation marks but small pdfs work so it's something else :(
Impressive tutorial! Thanks a lot! I have looking for such as solution for a while
You are most welcome.
This is awesome, I love how you are creating premium content with all files used.
I will definitely follow up to learn PowerBi from you Hamza😊
Many thanks Amer. I am glad you think so 😎
Hey, is there a way to load a list of pdf through links? how do we go about it?
Hi @karanpradhan, I assume you mean a web link? If so, you should also be able to. But you need to update the Python code to take the input as a weblink. I will keep it on my notes to cover it in one of the videos
Hi, i have followed this tutorial but my pdf appeared to be stretched to fill. Is there a way to make sure the pdf resolution is kept?
Hi, I am not sure I understood what you meant by stretched to fill.
Do you mean it doesn’t fit in the pdf viewer? If so, you can use the zoom and scroll feature of this visual.
Does this feature work for Power BI embedded?
Hi there. Yes, it should work with embedded reports
Hello! Great Tutorial! But I had a problem... When I pasted the base64 code to excel, it filled 152 lines instead of the 15, as in the video. What could I be doing wrong? Can someone give me a hand? Thanks!!!
Hi Victor. It seems that you have a big file with many pages, which means much bigger size. To over come this, divide the file up into pages and bring separate pages. Check this tutorial for more details: th-cam.com/video/dU_wgeuPE2g/w-d-xo.htmlsi=RsNraMf8cIRWMsSx
Thank you so much for the answer!! I will give it a try, and let you kow if it works! If not I ask again! @@NextGenBIGuru
Nice video Thank you
Hi Alex, you are most welcome
Great video! However, I realized that I can have up to 60 columns concatenated. There is still limitations from PBI, I assume:
The function 'PLACEHOLDER' encountered a Text that exceeded the maximum allowable length.
Are you aware of that or is not the best practice to do this?
Hello 👋, yes there is limitation. For long PDFs you need to divide them up into sections or pages. To get a better idea, check out the below tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru
th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Hi thanks Alot dear for this , I would like to know please if you can advise
If I'll connect the pdf files with the main dashboard
For e.g if I have a sales pie chart on the main dashboard and I'll click on it then sales details in pdf will open
Please advise if there is an option for this , would really appreciate
Hello 👋, it is possible if you manage to link pages to your data. You need to develop a data model that against each row you have page reference. Check out this tutorial, it might give you some ideas: Embedding PDFs In Power BI: Visualize, Search & Highlight Techniques | NextGen BI Guru
th-cam.com/video/J0nprINRsw8/w-d-xo.html
Thanks ❤ you are a gem
Thank you so much ❤ it works for me, however the texts are not clear enough even after zooming the contents
Hello 👋, you are welcome! Probably the type of PDF is scanned this is why. Usually this is related to the input PDF.
Excellent Hamzah that is so helpful
Hi thank you so much for this video. It's so interesting
I have a question plz : is the pdf printable?
Thanks !
What an excellent question! I wish I’ve covered it in the video.
Anyway, you can’t print the visual alone directly. However, you can put the visual in focus mode, from the top right corner of the visual. Then from file you can export it to PDF. Hope this workaround helps. Best of luck!
Great work ! Amazing tutorial ! Thank you !
You are most welcome! Thank you
When finishing the calculated column, the following error message returns:
The 'PLACEHOLDER' function found Text that exceeds the maximum allowed size.
Hello 👋🏼, it seems you are trying to embed big pdfs which means you have so many columns you are trying to combine. To overcome this you need to divide your pdfs to pages. But don’t worry, you don’t have to do this manually. The below tutorial has a script that will do this for you.
Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru
th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Hi, Thank for the video. It work fine when PDF size is small like 4 page n so, but when pdf size increased to 30 page, converting it to base64 result value in column from a to ce length in excel. Later when command in power bi (BAse64pdf = ts[a] to ts[ce]) power give back error (Function 'PLACEHOLDER' encountered a Text that exceeds the maximum allowable length.) do you have any solution for this
Hello 👋, yes for large pdfs you need to divide it up. But there is always an easy and automated way to do it. Check out this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru
th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Fantastic, muy util, algo que buscaba desde hace mucho, y tu explicacion sencillisima de entender
Thank you 🙏
Outstanding 😮
Hello 👋 . Thank you!
Such a useful capability that is hard to find anywhere on the web + a clear and concise walkthrough.. You're a legend, Thank You!
One question is do you know if there is a limit to how many of the 32,000 character cells can be combined in a calculated column in BI. I am working with pdfs that can be 100+ pages and was wondering if you had a sense of if there was a limit.
Hello 👋🏼, thanks for your feedback! In your case you need to divide them into pages. Luckily you can automate it. Check out this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru
th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
Incredible!! Thak you so much.
You're very welcome!
Thanks you very much
You are welcome
Great work, keep it up
Good job 👏
Useful. Keep it up
When I run this .py script on a few of my PDF's I get a dump of errors, I have just copied in what I think are the important lines below. When I ran it using your sample PDF's the script worked, then I tried to manually convert one my existing PDF using Aspose utility, it threw an error. What could the Base64 routine be complaining about? I tried several PDF's and many of them showed same conversion error... is there a limit to the size of the PDF? When I did the Step #1 manual conversion my Base64 import has 317 columns!
== Script Error ===
raise ValueError("dict contains fields not in fieldnames: "
ValueError: dict contains fields not in fieldnames: 'B149', 'B139', 'B180', 'B32', 'B66', 'B42', 'B86', 'B153', 'B50'... goes on to 'B280'
Thanks in advance.
** UPDATE ** I changed the .PY array range from (30) to range(325) and no errors, then imported to PBi but there unable to concate the columns as the CalcColumn will not generate more than 250 columns. Is there a workaround to display this large PDF?
Hello my friend. If you have huge pdf. Please follow this tutorial: Elevate Your Dashboards: Power BI Techniques For PDF Content Search | NextGen BI Guru
th-cam.com/video/dU_wgeuPE2g/w-d-xo.html
@@NextGenBIGuru I found this explanation. blog.crossjoin.co.uk/2019/05/17/maximum-length-text-value-power-bi/. It says that there is a limit of concatenate DAX Functions. Around 2.1 million characters. So i modified some of the lines of the original python code like this:
with open(CSV_Dir, 'a',encoding="UTF8") as f: #add the PDF base64 code into the CSV file
NRow = DictWriter(f, fieldnames=field_names, lineterminator = '
')
Data_={'Source':FName}
count = 0
for j in range(int(len(my_string)/32000)+1):#break the base64 code into portions of 32000 charachters before saving them into the CSV file to avoid the characters length limitation
Data_['B' + str(j)]=my_string[j*32000:(j+1)*32000]
count += 1
characters = count*32000
if characters
@@NextGenBIGuru I found this explanation. blog.crossjoin.co.uk/2019/05/17/maximum-length-text-value-power-bi/. It says that there is a limit of concatenate DAX Functions. Around 2.1 million characters. So i modified some of the lines of the original python code like this:
with open(CSV_Dir, 'a',encoding="UTF8") as f: #add the PDF base64 code into the CSV file
NRow = DictWriter(f, fieldnames=field_names, lineterminator = '
')
Data_={'Source':FName}
count = 0
for j in range(int(len(my_string)/32000)+1):#break the base64 code into portions of 32000 charachters before saving them into the CSV file to avoid the characters length limitation
Data_['B' + str(j)]=my_string[j*32000:(j+1)*32000]
count += 1
characters = count*32000
if characters
You now can encode base 64 right in Power Query and Power BI accommodates way more than 30k characters in the same column (2 tips right here), however from my experience visuals don't accept Base64 string over 30k characters - what is the trick here?
Hello 👋🏼, the issue is not with visuals not accepting more than limited number of characters. The limitation is with the PowerQuery that doesn’t accept more than 32k characters in one cell. To overcome this, you divide them into many columns then you create a DAX calculated column to join them.
@@NextGenBIGuru Power BI model can handle a million character fields now. 32k limit was removed last year I believe. Just try to import pretty large pdf and check number of characters (I added calculated column with Text.Length). This should immensely simplify handling of pdfs in Power BI (base64 inside Power Query + no need to split and merge columns) but it looks like there is another issue. I would suspect missing prefix for Base64 or quotation marks but small pdfs work so it's something else :(
Well done it works
👏 👏 👏 hamza
great video
Thank you! Glad you liked it
You can display PDF file in the report as it is: th-cam.com/video/TEou0LuPjkA/w-d-xo.html
Thank you
U gonna be out of a job soon
Always a possibility