Forum Discussion
itsmebvk
3 years agoContinued Contributor
Product Ranking in Total Group Values?
Hi Experts, I am trying to create a report where I want to show selected product ranking based on slicer selection, along with that i also want to show total product count with in the group wh...
- 3 years ago
Hi itsmebvk ,
Follow the steps Below:
1-Create a measure:
QuantityMeasure = SUM('Fact'[Qty])2-The Create this one for your count:
CountofProductsMeasure = CALCULATE ( COUNTROWS ( VALUES ( Dim[Product] ) ), FILTER ( ALL ( DIM ), Dim[Group] = SELECTEDVALUE ( Dim[Group] ) ) )3-Then this one for your Ranking:
RankMeasure = CALCULATE ( RANKX ( FILTER ( SUMMARIZE ( ALL ( Dim ), Dim[Product], Dim[Group] ), Dim[Group] = SELECTEDVALUE ( Dim[Group] ) ), [QuantityMeasure] ) )4-And the last step:
ConcatenatedMeasure = "''" &[CountofProductsMeasure] & "/" & [RankMeasure] & "''"If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran
MohammadLoran25
3 years agoSolution Sage
Hi itsmebvk ,
Follow the steps Below:
1-Create a measure:
QuantityMeasure = SUM('Fact'[Qty])
2-The Create this one for your count:
CountofProductsMeasure =
CALCULATE (
COUNTROWS ( VALUES ( Dim[Product] ) ),
FILTER ( ALL ( DIM ), Dim[Group] = SELECTEDVALUE ( Dim[Group] ) )
)
3-Then this one for your Ranking:
RankMeasure =
CALCULATE (
RANKX (
FILTER (
SUMMARIZE ( ALL ( Dim ), Dim[Product], Dim[Group] ),
Dim[Group] = SELECTEDVALUE ( Dim[Group] )
),
[QuantityMeasure]
)
)
4-And the last step:
ConcatenatedMeasure = "''" &[CountofProductsMeasure] & "/" & [RankMeasure] & "''"
If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran
itsmebvk
3 years agoContinued Contributor
MohammadLoran25 This worked like a charm. Thanks alot for quick inputs.