Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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))
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.