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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Expression-based header don't work from report file, only from dataset

Hi,

I have a large dataset as a pbix file on which I build several reports in seperate pbix files. 

For a specific report I want to use dynamic headers/expression-based headers. I have created the following measure in my report file (see below), but when I want to set the header through General -> Title -> fx it will not allow me to pick the measure. However, if I build the same measure in my dataset and update my report, it allows me to pick it. 

My dataset is already fairly measure heavy and I don't want to pollute it with report specific measures like this. Is there another way I can make this work?

 

JrgenAa_0-1681372553072.png

 

 

1 ACCEPTED SOLUTION
DimaMD
Solution Sage
Solution Sage

@Anonymous I have created test data, please see the attached file and tell me if this is what you are talking about,
In your measure you need to add Format with type "String"

return
Format( _parameter, "String")

__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

View solution in original post

5 REPLIES 5
DimaMD
Solution Sage
Solution Sage

@Anonymous I have created test data, please see the attached file and tell me if this is what you are talking about,
In your measure you need to add Format with type "String"

return
Format( _parameter, "String")

__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Anonymous
Not applicable

Hi again, 

Yes, that was it. Thank you! Can't believe I overlooked the datatype, it seems so obvious. But now it works, thanks again 🙂 

DimaMD
Solution Sage
Solution Sage

Hi @Anonymous I think you need to remove the double quotes where you indicate the measure.
What result should your header measure show?


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Anonymous
Not applicable

Hi,

The double quotes is part of the expression returning from SELECTEDVALUE(VolumOmsetning[Parameter Fields]). I need them in my switch statement in order for it to return the desired string (please note that I have made I slight change to the measure posted in my original post).

 

What I want the measure to return is simply "Total omsetning" when I have chosen parameter "omsetning" (revenue) or "Totalt volum" when I have chosen paramter "volum". As you can see it works when I put the measure in a card, and it also work on my visualization when I create the measure in my dataset

 

JrgenAa_0-1681372848950.png

 

@Anonymous Can you share a sample data, non-confidential?

 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.