Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
i hope someone can help me.
I'm confused.
This is my dashboard.
What I want to achieve, is to get the Total of the Sum under the Column 04 Sum_N1_Top_5.
So that I can display it in the Card-View.
The whole thing is complicated by the fact that
I only would like to rank the values that lie above the values of the two parameter slicers.
To get a better understand, my DAX so far is
In the first Step, the Calculation of the Sum from Column N1.
01 Total_Sum_N1 =
SUM ( 'Export'[N1] )
The second Step is to check if the Values in the Column N1 and N2 are above the parameter slicers.
02 Points =
VAR SUM_N1 =
SUM ( 'Export'[N1] )
VAR SUM_N2 =
SUM ( 'Export'[N2] )
VAR SUMParameter_N1 =
SUM ( N1[N1] )
VAR SUMParameter_N2 =
SUM ( N2[Parameter] )
VAR Check_N1 =
IF ( SUMParameter_N1 < SUM_N1, 1, 0 )
VAR Check_N2 =
IF ( SUMParameter_N2 < SUM_N2, 1, 0 )
VAR Sum_Check = Check_N1 + Check_N2
RETURN
Sum_Check
In the next Step is Ranking, with this DAX.
03 Ranking =
VAR __Table =
ADDCOLUMNS ( 'Export', "__Points", [02 Points] )
VAR Ranking =
IF (
AND ( HASONEVALUE ( 'Export'[Bezeichnung] ), [02 Points] = 2 ),
RANKX ( ALLSELECTED ( 'Export'[Bezeichnung] ), [01 Total_Sum_N1],, DESC, DENSE ),
""
)
RETURN
Ranking
Then in the next and final Step I want to get the total Value of, for example everything with a ranking of 5 or better.
04 Sum_N1_TOP_5 =
VAR __Table =
ADDCOLUMNS ( 'Export', "__Ranking", [03 Ranking] )
VAR Ranking_Check =
IF ( [03 Ranking] <= 5, 1, "" )
VAR Ranking_Sum =
IF ( [03 Ranking] <= 5, SUM ( 'Export'[N1] ), "" )
RETURN
Ranking_Sum
But now I get the Value of everything with a Ranking of 5 or better, but not the total that I need.
You can finde the data plus pbix file here
https://1drv.ms/u/s!AoFqgLqZH-C0hMxf0ytDa_dP_BvGUw?e=uyv3Pb
Thanks
Solved! Go to Solution.
Hi @Yonah ,
I updated your sample pbix file(see attachment), please check if that is what you want. You can create another new measure as below to replace the original measure [04 Sum_N1_TOP_5] and put it on the visual....
Measure =
IF (
ISINSCOPE ( 'Export'[Bezeichnung] )
&& [03 Ranking] > 5,
BLANK (),
SUMX ( VALUES ( 'Export'[Bezeichnung] ), [04 Sum_N1_TOP_5] )
)
Best Regards
Hi @Yonah ,
I updated your sample pbix file(see attachment), please check if that is what you want. You can create another new measure as below to replace the original measure [04 Sum_N1_TOP_5] and put it on the visual....
Measure =
IF (
ISINSCOPE ( 'Export'[Bezeichnung] )
&& [03 Ranking] > 5,
BLANK (),
SUMX ( VALUES ( 'Export'[Bezeichnung] ), [04 Sum_N1_TOP_5] )
)
Best Regards
Hi @Yonah ,
try this measure
Measure =
IF(HASONEVALUE('Export'[Bezeichnung]),[04 Sum_N1_TOP_5],SUMX(VALUES('Export'[Bezeichnung]),[04 Sum_N1_TOP_5]))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.