cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors