Forum Discussion
rcyber
8 years agoResolver I
Dynamic rank issue
Hi all! I'm trying to create the Pareto chart based on multiple slicers. I have two columns for slicing. They are named "Area" and "Exp Category". And I have the "USD" column. It contains amounts I...
Zubair_Muhammad
8 years agoCommunity Champion
And Cumulative Area as follows
Cumulative Area Total =
VAR rr = [Rank CC Area]
RETURN
(
CALCULATE (
SUM ( Data[USD] ),
FILTER (
SUMMARIZE ( ALLSELECTED ( data ), Data[Area], Data[Exp Category] ),
[Rank CC Area] <= rr
)
)
)
rcyber
8 years agoResolver I
Thanks a lot for quick help.
It works good and calculates rank correctly.
But it's not exactly what I want co create.
The SUMMARIZE function calculates subtotals with filtering by Data[Area] and Data[Exp Categories] fields.
But I want to calculate (and rank next) subtotals grouping by Data[Area] and filtering Data[Area] and Data[Exp Categories] both.
I want to create the report like this:
I hope you understand what I mean.
Thanks in advance,
Alexander.
- Zubair_Muhammad8 years agoCommunity Champion
- rcyber8 years agoResolver I
- Zubair_Muhammad8 years agoCommunity Champion
Hi rcyber
My apologies for late reply...
Please try this revised MEASURE.
File attached here as well
Rank CC Area = RANKX ( ALLSELECTED ( Data[Area] ), CALCULATE ( SUM ( Data[USD] ) ), , DESC, DENSE )Cumulative Area Total = VAR rr = [Rank CC Area] RETURN ( CALCULATE ( SUM ( Data[USD] ), FILTER ( ALLSELECTED ( Data[Area] ), [Rank CC Area] <= rr ) ) )