Forum Discussion
TOPN in graphs/Dynamic
- 8 years ago
Hey,
here you will find a pbix file.
I changed the DAX of the measure that ranks the customer (guess this is what you call Payer) to
GroupRank = RANKX( ALLSELECTED(Table1[Customer]) ,CALCULATE(SUM(Table1[Amount])) )
And I also changed the Interaction Setting of the chart showing the Top 5 Customer to filter
Mark the Chart showing the countries: Menu Format, Toggle: Edit Interactions, Switch the Customer chart from Highligh to Filter, Toggle: Edit Interactions
Hope this is what you are looking for
Regards
Tom
As CahabaData said, you need to have a measure to rank your values, and then add this rank to your visual filter.
Create two measures.
TotalAmount = SUM(Table1[Amount])
GroupRank = RANKX(ALLEXCEPT(Table1,Table1[Group]),Table1[TotalAmount])
Regards,
Charlie Liao
- estefaniamc8 years agoFrequent Visitor
Thanks for your reply. Unfortunattely; I can´t make it work.
I have two columns, one of them is Payer and the other one is the amount. I would like to see on a bar chart the top 5 payers by highest amount, I also would like that when I filter by date or Region, this graph is updated. &
I tried the formula you mentioned.
TotalAmount = Sum(MyTable[Amount])
GroupRank = RANKX(ALLEXCEPT(MyTable,MyTable[Payer Name]),sum(MyTable[TotalAmount]))
Then I filtered on the graph GroupRank less or equal to 5 but when I filter by Region the bar chart doesn´t get updated.
Please see data set sample below:
Region Country Customer Amount EMEA Germany AA 5 EMEA Italy BB 10 EMEA France CC 8 EMEA Germany DD 20 LATAM Brazil AA 5 LATAM Argentina BB 9 LATAM Mexico CC 15 LATAM Brazil DD 3 LATAM Colombia EE 5 LATAM Colombia AA 10 NA US FF 15 NA Canada CC 12 NA US HH 15 NA US EE 32 AP China AA 15 AP Japan JJ 20 AP Vietnam UU 27 EMEA France SS 30 LATAM Argentina EE 50 AP Vietnam BB 5 AP Thailand JJ 2 AP Vietnam UU 7 Thanks in advance for your assitance,
Regards,
Estefania- estefaniamc8 years agoFrequent Visitor
- TomMartens8 years agoSuper User
Hey,
here you will find a pbix file.
I changed the DAX of the measure that ranks the customer (guess this is what you call Payer) to
GroupRank = RANKX( ALLSELECTED(Table1[Customer]) ,CALCULATE(SUM(Table1[Amount])) )
And I also changed the Interaction Setting of the chart showing the Top 5 Customer to filter
Mark the Chart showing the countries: Menu Format, Toggle: Edit Interactions, Switch the Customer chart from Highligh to Filter, Toggle: Edit Interactions
Hope this is what you are looking for
Regards
Tom