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
sabeensp
Helper IV
Helper IV

Constant Calculated measure value with slicer interaction

Hello,

I have a report with bunch of slicers, however all teh slicers value are pinned to same table "Model". I have craeted a Measure as below:

MeasureName = 
var vNum = CALCULATE (COUNT(TABLE1[COST] , Filter (Table1, Table1[Color] = "Blue") // This is Numerator

var vDen = CALCULATE (SUM(TABLE1[REVENUE] , Filter (Table1, Table1[Year] = 2019) , ALL (TABLE1)
// This is Denominator

RETURN

vNum / vDen

 

But When user selects the value in Solicer Denominator also changes, I want Denominator to stay constant.

 

Please help.

1 ACCEPTED SOLUTION

@sabeensp 

 

 

I belive what @Anonymous is referring to is this code:

var vDen = CALCULATE (SUM(TABLE1[REVENUE] , Filter (Table1, Table1[Year] = 2019) , ALL('Table'[Column])

 

If this works for you, please accept @Anonymous  post.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@sabeensp - You want to ignore the filter on a certain column. In other words, modify the natural filter context. To do this, you add an ALL('Table'[Column]) as a new parameter in your CALCULATE.

Hope this helps,

Nathan

@Anonymous  Sorry, I'm new to DAX. COuld you please furher elobrate or give me the syntax?

@sabeensp 

 

 

I belive what @Anonymous is referring to is this code:

var vDen = CALCULATE (SUM(TABLE1[REVENUE] , Filter (Table1, Table1[Year] = 2019) , ALL('Table'[Column])

 

If this works for you, please accept @Anonymous  post.

Anonymous
Not applicable

@Jorgast - Yes, that's what I meant - thanks.

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.