Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to get TopN total value based on TopN slicer selection.
My sample source data
Suppose, I selected TopN value is 2 and I get 2 rows thats correct. Total row value is fetching overall value (10,500) but I want to Total value is only 5,500.
Anyone suggest me how to solve it.
I used code is below,
New Amount =
SUMX(
TOPN(
'_TopN'[TOP_N_Value],
FILTER('Sample', 'Sample'[Active Flag] = 1),
'Sample'[Amount], DESC),
'Sample'[Amount]
)
thanks,
Ram
Solved! Go to Solution.
@Ramachandran , Try a measure like
calculate(sum('Sample'[Amount]), TOPN(
'_TopN'[TOP_N_Value], allselected('Sample'[Country]), 'Sample'[Amount], DESC), values('Sample'['Sample'[Country]),
FILTER('Sample', 'Sample'[Active Flag] = 1))
@Ramachandran , Try a measure like
calculate(sum('Sample'[Amount]), TOPN(
'_TopN'[TOP_N_Value], allselected('Sample'[Country]), 'Sample'[Amount], DESC), values('Sample'['Sample'[Country]),
FILTER('Sample', 'Sample'[Active Flag] = 1))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |