Forum Discussion
Filter matrix by RankX measure
- 2 years ago
Hi Lars_Denmark ,
Create the following measures:
Total Revenue for top customers = VAR _temptable = ADDCOLUMNS( VALUES('DummyData'[Customer]), "rank", [Ranking Measure] ) RETURN SUMX( FILTER( 'DummyData', 'DummyData'[Customer] IN SELECTCOLUMNS( FILTER( _temptable, [rank] <> BLANK() ), "d", 'DummyData'[Customer] ) ), [Revenue Measure] ) % Over Total = DIVIDE([Total Revenue for top customers], [Revenue Measure])File attach.
MFelix, many thanks for this solution and it actually gives the result I asked for.
Based on the table, I have now tried to create a corresponding clustered column chart with the filter Ranking Measure <> Blank , which shows the revenue per month for the selected customers, but I don't think I can make it work when I don't include the customers in the chart.
I would therefore like to ask if you have the opportunity to also show how I can get such a line and clustered column chart to show the revenue in columns for, for example, the 3 ranked customers, where Jan = 665, Feb = 2431, Mar = 640
and on the line, I want to show the 3 customers' revenue as a percentage of the month's total revenue for all customers (2nd y-axis)
Hi Lars_Denmark ,
Create the following measures:
Total Revenue for top customers =
VAR _temptable = ADDCOLUMNS(
VALUES('DummyData'[Customer]),
"rank", [Ranking Measure]
)
RETURN
SUMX(
FILTER(
'DummyData',
'DummyData'[Customer] IN SELECTCOLUMNS(
FILTER(
_temptable,
[rank] <> BLANK()
),
"d",
'DummyData'[Customer]
)
),
[Revenue Measure]
)
% Over Total = DIVIDE([Total Revenue for top customers], [Revenue Measure])
File attach.