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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.