cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Norwaychris
Frequent Visitor

Using Parameters in Measures that are then used in a Legend

We have a measure that uses the values of a parameter in its calculation of OK/not OK. This works great in our table. However, we want to show this in a visual using that measure as the legend. We can't get this to work.

 

I have created a sample Power BI report showing this exact problem. Does anyone have a way to get this to work?

image 10.png

 

Here is the pbix file:

 

 

 

1 ACCEPTED SOLUTION
Norwaychris
Frequent Visitor

Another working solution that avoids using the legend field is by creating a measure for each of the ok and no ok. Then, you just add them both to the dataset for the visual. Power BI then adds them to the legend area of the visual.

View solution in original post

4 REPLIES 4
v-yadongf-msft
Community Support
Community Support

Hi @Norwaychris ,

 

Thank you for sharing your solution with us. 

 

I am so glad to hear that your problem has been solved . Please consider Accept it as the solution to help the other members find it more quickly.

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, I still didn't get a solution as to whether it is possible to solve the issue with the legend. Though, if someone can tell me this isn't possible, I can mark that is the correct answer. I have only found workarounds so far, but haven't had anyone say straight forward this isn't possible. Thanks.

Norwaychris
Frequent Visitor

Another working solution that avoids using the legend field is by creating a measure for each of the ok and no ok. Then, you just add them both to the dataset for the visual. Power BI then adds them to the legend area of the visual.

Norwaychris
Frequent Visitor

I had one developer show me a solution using a cartesian product done in Power Query and then using the parameter to filter the result and then using that for legend. This won't work in my case, but it is a solution.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors