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
ruecj5
Advocate I
Advocate I

How to control filtering in denominator of Measure

Hi,

 

This is difficult to explain, but I will be as descriptive as possible and thanks in advance to anyone who can help with this.

 

I am working on creating a bar chart visual to show proportions and I am having trouble creating a measure that can allow for the numerator to be influenced by all filters, while only letting some filters influence the denominator.

 

My data comes from a survey question that asks respondents why they visited a website and presents them with 6 options to pick with their answer is stored as a code (1-6 for the six options).  These 6 options have labels applied via a related table and are what make up the y-axis of my chart.  Ideally I should have the % that each of the 6 options makes up from the full base size of those who answered (totalling 100%), but the labels on the chart are serving as filters for the denominator when I do not want them to, throwing off the % calculation.

 

Can anyone help me write a Measure where the numerator is filterable as normal, but the denominator does not filter based on the 6 options that make up the axis of the chart?

 

I am hoping this is something simple, but I am stumped on how to do this without hard coding the denominator and I do not want to do that as there are other filters that I would like to influence the chart and hard coding will prevent that.

 

Thanks,

Chris

 

Here is a visual of my chart to give you an idea of what I am talking about:

chart1.JPG

1 REPLY 1
Anonymous
Not applicable

Does something like this work out?

 

Result Count := COUNTROWS(Results)

Result Count - ALL := CALCULATE([Result Count], ALL(Results))

Result % := DIVIDE([Result Count], [Result Count - ALL])

 

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.