Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tensixtyone
New Member

HASONEVALUE() question

Hi,

 

I'm having a few problems displaying a PDF in a report im currently working on.

 

Everything worked fine before the start of the weekend. However, when i tuned in this morning, something seemed to have broke on me.

 

I got to display a PDF through the PDF Viewer, and i got it working fine, showing the right PDF with multiple PDF's present in the source folder on SharePoint etc. 

 

However, for some reason, that does not seem to work anymore. I have tested around for a bit, and located the issue to most likely be due to how HASONEVALUE() works. I'm using this string to concatenate the split-up Base64 columns as a new column;

 

Base64StringConc = if(HASONEVALUE('Query2'[Name]), CONCATENATEX('Query2', 'Query2'[Pic], , 'Query2'[Index], ASC))
 
It works fine for a few refreshes when there is other PDF files present in the source folder, however, after a while it breaks and i get the mentioned white screen as output.
 
I wonder if there's an alternative way to filter which PDF i want in the Viewer, or if i made a mistake somewhere?
 
For reference, this is the data im working with right now; 
Test1.PNG
The file with the crossed out name is the one i want to be shown in my report. The source is a SharePoint folder as mentioned, where i have used Power Automate to fetch and rename a PDF every time an e-mail with a specific subject field and an attachment is sent to me, and replace the present PDF in the folder.
4 REPLIES 4
amitchandak
Super User
Super User

@tensixtyone , Are you creating a measure or a column>

HASONEVALUE should be used in measure and it check if only one value is filtered

 

 

refer if needed

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Im creating a new column, as the PDF viewer doesnt take a measure

@tensixtyone , I doubt it is a suitable to function for a new column

just try

CONCATENATEX('Query2', 'Query2'[Pic], , 'Query2'[Index], ASC)

Just tried out your suggestion, however it doesn't seem to work. It adds the different PDF's base64 string together instead of seperating them

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.