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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SteveG_91
Helper I
Helper I

Force a measure to not by affected by a slicer

I have a matrix visual with two values in it.  I want one of the values to update based on the month slicer that is on the page but the other value should not update.

 

The value that should not update is a measuer, named "Max Bonus Date", which should select the max BONUS_DATE from a table named "Monthly Estimates 2".  That table has BONUS_DATEs going back over two years, one row per month, with the latest date being 8/1/2022.  What I would like is for the measure to always show the maximum BONUS_DATE, currently 8/1/2022, regardless of the month selected by the slicer.  Then next month when September is added it will show 9/1/2022.

 

Right now if I select July 2022 on the slicer the measure will show 7/1/2022.  If I select June 2022 it will show 6/1/2022, etc.   The slicer should only be affecting the other value on the matrix visual, which uses another measure.

 

I believe there must be an easy way to do this but every combination I've tried using various functions, (ALL, ALLSELECTED, ALLNOBLANKROW, REMOVEFILTERS, SELECTEDVALUES, MAX, CALCULATE) seems to work.  I either get an error or the measure continues to be driven by the slicer.

 

Thanks in advance!

 

 
2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

@SteveG_91 

This should give you what you are looking for.

 

Max Bonus Date = 
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALL ( 'Monthly Estimates 2' ) )

 

 

View solution in original post

jdbuchanan71
Super User
Super User

Yep, give this a go.

Max Bonus Date = 
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALLEXCEPT ( 'Monthly Estimates 2', 'Monthly Estimates 2'[company_code] ) )

View solution in original post

5 REPLIES 5
jdbuchanan71
Super User
Super User

Yep, give this a go.

Max Bonus Date = 
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALLEXCEPT ( 'Monthly Estimates 2', 'Monthly Estimates 2'[company_code] ) )

Worked like a charm.  Thank you!

If you're ever in Atlanta let me know and I'll buy you a beer.  Cheers!

jdbuchanan71
Super User
Super User

@SteveG_91 

This should give you what you are looking for.

 

Max Bonus Date = 
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALL ( 'Monthly Estimates 2' ) )

 

 

Sorry, I have another question.  There are three possible dates for each month, each one identified by a column on the table named "company_code".  I'm putting these dates in a matrix visual with the Max Bonus Date as the value and company_code as the column.  There are three unique company_codes, A, B, and C and each has it's own, unique date.  It seems the "ALL" command is causing the matrix to show the same value for each date rather than show the different vlaue for each company_code under it's column on the matrix.  Any suggestions?

Thank you @jdbuchanan71 that worked perfectly.  I knew there had to be a way, I just needed the right sequence of commands.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.