Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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!
Solved! Go to Solution.
This should give you what you are looking for.
Max Bonus Date =
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALL ( 'Monthly Estimates 2' ) )
Yep, give this a go.
Max Bonus Date =
CALCULATE ( MAX ( 'Monthly Estimates 2'[BONUS_DATE] ), ALLEXCEPT ( 'Monthly Estimates 2', 'Monthly Estimates 2'[company_code] ) )
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!
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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
111 | |
94 | |
92 | |
84 | |
69 |
User | Count |
---|---|
162 | |
129 | |
126 | |
106 | |
98 |