Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
75 | |
64 | |
52 | |
47 |
User | Count |
---|---|
218 | |
88 | |
73 | |
64 | |
60 |