Forum Discussion
top N with % on total
- Anonymous2 years ago
Hi shalabh ,
Please follow these steps:
- add new measure "SORT"
SORT = RANKX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Sales] ), CALCULATE ( MAX ( 'Table'[Sales] ) ), , DESC )- add new measure "RESULT"
RESULT = VAR _1 = SUMX ( ALL ( 'Table' ), 'Table'[Sales] ) VAR _2 = MAX ( 'Table'[Sales] ) / _1 RETURN IF ( 'Table'[SORT] <= 3, _2, BLANK () )3.final output
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Yifan Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi shalabh ,
Please follow these steps:
- add new measure "SORT"
SORT =
RANKX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Sales] ),
CALCULATE ( MAX ( 'Table'[Sales] ) ),
,
DESC
)
- add new measure "RESULT"
RESULT =
VAR _1 =
SUMX ( ALL ( 'Table' ), 'Table'[Sales] )
VAR _2 =
MAX ( 'Table'[Sales] ) / _1
RETURN
IF ( 'Table'[SORT] <= 3, _2, BLANK () )
3.final output
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Yifan Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.