Forum Discussion
DAX Ranking within Group
- Anonymous2 years ago
Hi KartikWatt ,
Please refer to my pbix file to see if it helps you.
Create 2 measures.
Measure = SUMX ( FILTER ( ALL ( 'Table' ), 'Table'[Store Name] = SELECTEDVALUE ( 'Table'[Store Name] ) ), 'Table'[Revenue] )Measure2 = VAR _1 = RANKX ( ALL ( 'Table' ), CALCULATE ( [Measure] ),, desc, DENSE ) RETURN IF ( MAX ( 'Table'[weekday] ) = _1, _1, BLANK () )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi KartikWatt ,
Please refer to my pbix file to see if it helps you.
Create 2 measures.
Measure =
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Store Name] = SELECTEDVALUE ( 'Table'[Store Name] )
),
'Table'[Revenue]
)
Measure2 =
VAR _1 =
RANKX ( ALL ( 'Table' ), CALCULATE ( [Measure] ),, desc, DENSE )
RETURN
IF ( MAX ( 'Table'[weekday] ) = _1, _1, BLANK () )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.