Forum Discussion
ktt777
Helper V
2 years agolookup DAX
Hi i have a data as below . Rank table 1 is calculated column, ranking the spend per country. how can i write formula to create a visual to show spend at rank 3 for each country as below...
- 2 years ago
To make it dynamic, change measure to capture rank by selection. Try this:
or if you want only for maximum, then you can use this:
DynamicSpendbyRank = VAR _selectedRank = MAX('Table'[Rank table 1]) VAR _result = CALCULATE( SUM('Table'[Spend]), 'Table'[Rank table 1] = _selectedRank ) RETURN _resultHope this helps!!
ktt777
Helper V
2 years agothank you. How about if i want to see the spend from the highest rank from each country, not at fixed rank 3.
shafiz_p
Super User
2 years agoTo make it dynamic, change measure to capture rank by selection. Try this:
or if you want only for maximum, then you can use this:
DynamicSpendbyRank =
VAR _selectedRank = MAX('Table'[Rank table 1])
VAR _result =
CALCULATE(
SUM('Table'[Spend]),
'Table'[Rank table 1] = _selectedRank
)
RETURN
_result
Hope this helps!!