Forum Discussion
Product ranking
- Anonymous2 years ago
Hi, MrMP
First, thanks for amitchandak help. If you have not solve the problem, you can try the following method.DAX:
Rank = RANKX ( FILTER ( 'Table', 'Table'[Date] = EARLIER ( 'Table'[Date] ) ), 'Table'[Sales], , DESC, Dense )MaxRank = VAR _maxRank = CALCULATE(MAX('Table'[Rank])) RETURN _maxRank RANK BY Product = IF ( CALCULATE ( SUM ( 'Table'[Rank] ) ) > [MaxRank], "Please select one Product", [MaxRank] )Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, MrMP
First, thanks for amitchandak help. If you have not solve the problem, you can try the following method.
DAX:
Rank =
RANKX (
FILTER (
'Table',
'Table'[Date] = EARLIER ( 'Table'[Date] )
),
'Table'[Sales],
,
DESC,
Dense
)
MaxRank =
VAR _maxRank = CALCULATE(MAX('Table'[Rank]))
RETURN
_maxRank
RANK BY Product =
IF (
CALCULATE ( SUM ( 'Table'[Rank] ) ) > [MaxRank],
"Please select one Product",
[MaxRank]
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum