cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sabeensp Member
Member

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

Accepted Solutions
Highlighted
Jorgast Member
Member

Re: Constant Calculated measure value with slicer interaction

@sabeensp 

 

 

I belive what @natelpeterson 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 @natelpeterson  post.

4 REPLIES 4
Super User
Super User

Re: Constant Calculated measure value with slicer interaction

@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

sabeensp Member
Member

Re: Constant Calculated measure value with slicer interaction

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

Highlighted
Jorgast Member
Member

Re: Constant Calculated measure value with slicer interaction

@sabeensp 

 

 

I belive what @natelpeterson 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 @natelpeterson  post.

Super User
Super User

Re: Constant Calculated measure value with slicer interaction

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

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 275 members 2,682 guests
Please welcome our newest community members: