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
KubaM
Frequent Visitor

Measure in value field to ignore the legend of chart

Hi everybody,

 

I have a problem with writing dax measure, that ignores legend field, so the data series is not repeated for every item by legend. 


I want my chart to show the rating (that is a simple average) and then to show category limits for ratings (ok, not ok, great) which are stored in separate table. I have two data types, so the ratings limits are diferent for each data type, but that is just a small problem.

 

If i use this chart, it looks fine, beceause it has secondary axis:

KubaM_2-1670878670429.png

 

But in visuals with only one axis, the ratings limits measures start to interact with the legend, and creates the ratings limits line (area) for every single value by the legend.

KubaM_3-1670878747085.png



For the ratings limits I am using this measures:

Not ok = LOOKUPVALUE(rating_limits[upper limit],rating_limits[Category],"Not Ok",rating_limits[Source ID],SELECTEDVALUE(Src_list[Source ID]))

This one creates the dulicates of the data series.

 

Then I've tried another measure with filters and ALL() but that one measure didn't work too.

 

CALCULATE(
   AVERAGE(rating_limits[upper limit),
   FILTER(rating_limits,
   reating_limits[Category]="Not ok" && Rating_limits[Source ID]=SELECTEDVALUE(Src_list[Source ID])
   ),
    ALLEXCEPT(Data,Data[Source ID]),
)

 

 

The relations are just like this:

KubaM_4-1670879313400.png

 

 

Link for the example is here: https://drive.google.com/file/d/1zuRRJ42O_C4TSo6a73YDGOxhZGqfyhMK/view?usp=sharing

Please help, I would be pleased 🙂

 

Thanks

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @KubaM ,

What's your expected result? Do you want to get the average of [upper limit] ignore the location?

Best Regards

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

So without the not working measures it looks like this:

KubaM_0-1670936166617.png

 thats fine.

And then with the ratings limits it should look like this:

KubaM_1-1670936587674.png


So it adds just one data series for every rating category upper limit.

The average function i used just to be abe to use calculate and multiple filter critirea. Beacause i didn't know how to combine filters, All() and the measure with Lookupvalue().

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