Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have this Measure Used in Matrix Table as value because I only want the last week displayed in the matrix, otherwise the category value will show up every week and it’s a bit of an eye sore. I also have a filter on the page for the HTS Category New, but what happens it is brining values from previous weeks, Is there a way to have this measure show up as a filter since I only want to filter by the latest week. I also tried to apply a filter on the Category field to only show latest top 1 week but that didn’t work either. Any help is appreciated.
HTS Category_For Matrix =
VAR _maxweek=
CALCULATE( MAX ( 'Table'[Week] ), ALLSELECTED ('Table' ))
RETURN
IF (
SELECTEDVALUE( 'Table'[Week] ) = _maxweek,
MAX ( 'Table'[HTS Category New] ),
BLANK ()
)
Solved! Go to Solution.
@jcastr02 There is an improved version of your measure that ensures only the latest week's data is displayed:
HTS Category_For Matrix =
VAR _maxweek =
CALCULATE(MAX('Table'[Week]), ALL('Table'))
RETURN
IF(
SELECTEDVALUE('Table'[Week]) = _maxweek,
MAX('Table'[HTS Category New]),
BLANK()
)
And then create a new measure to identify the latest week:
LatestWeekFlag =
VAR _maxweek =
CALCULATE(MAX('Table'[Week]), ALL('Table'))
RETURN
IF(MAX('Table'[Week]) = _maxweek, 1, 0)
Add the LatestWeekFlag measure to your matrix visual.
Set the filter condition to show only where LatestWeekFlag is 1.
Proud to be a Super User! |
|
@jcastr02 There is an improved version of your measure that ensures only the latest week's data is displayed:
HTS Category_For Matrix =
VAR _maxweek =
CALCULATE(MAX('Table'[Week]), ALL('Table'))
RETURN
IF(
SELECTEDVALUE('Table'[Week]) = _maxweek,
MAX('Table'[HTS Category New]),
BLANK()
)
And then create a new measure to identify the latest week:
LatestWeekFlag =
VAR _maxweek =
CALCULATE(MAX('Table'[Week]), ALL('Table'))
RETURN
IF(MAX('Table'[Week]) = _maxweek, 1, 0)
Add the LatestWeekFlag measure to your matrix visual.
Set the filter condition to show only where LatestWeekFlag is 1.
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
49 | |
41 | |
34 |
User | Count |
---|---|
164 | |
111 | |
62 | |
53 | |
38 |