Forum Discussion
ViralPatel212
Resolver I
3 months agoTOP N affected by Legend in Bar Graph
Hi All, I have created a disconnected TOP N table where its got my All my Dealers + a single row called Others, and this has a relationship with the main table Dealer to Dealer. Relationship: ...
- 3 months ago
When you add Participant to the Legend, the visual evaluates your measure for every Dealer + Participant combination. If you do not want it to affect the visual you could try using REMOVEFILTERs() inside your measure:
Top N Spend = VAR _TOPNSelected = SELECTEDVALUE ( 'Top N'[TopN] ) VAR _CurrentDealer = SELECTEDVALUE ( 'Counterparty List 2'[Dealer] ) VAR _TopDealerTable = TOPN ( _TOPNSelected, ALLSELECTED ( 'Counterparty List 2' ), CALCULATE ( [Metrics], REMOVEFILTERS ( 'Dealer Ranking'[Participant] ) ) ) VAR _IsTopDealer = COUNTROWS ( INTERSECT ( VALUES ( 'Counterparty List 2'[Dealer] ), SELECTCOLUMNS ( _TopDealerTable, "Dealer", [Dealer] ) ) ) > 0 VAR _TopDealerCommission = CALCULATE ( [Metrics], KEEPFILTERS ( _TopDealerTable ) ) VAR _OtherCommission = CALCULATE ( [Metrics], ALLSELECTED ( 'Counterparty List 2' ) ) - CALCULATE ( [Metrics], _TopDealerTable ) RETURN IF ( _CurrentDealer <> "Others", IF ( _IsTopDealer, _TopDealerCommission ), _OtherCommission )
DanieleUgoCopp
Super User
3 months agoHello,
You could try using ALL or REMOVEFILTERS on the Participant field inside the ranking/TOPN calculation, so the ranking ignores the legend context but still displays the split in the chart. Sometimes creating a separate ranking measure also helps keep the TOPN stable.
Best regards,
Daniele
ViralPatel212
Resolver I
3 months agoHi
thanks for the suggestion: im still confused on how to do that? do i amend the current measure?