The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
im trying to build a measure to calculate Value of top 500,1000,1500,2000 and other.
My Dax so far is:
DB3_TEST_Summe =
VAR Points_Top_Lager = [DB3__top_Lager_Check] + [DB3_pro_Stück_Top_Lager_Check] + [Rendite_Top_Lagerführend_Check] + [Retouren_tpü_check] + [Menge_top_Lager_check]
VAR Ranking =
IF (
AND ( HASONEVALUE ( 'Top-Lagerführend'[Bezeichnung] ), [Points_Top_Lager] = 5 ),
RANKX (
ALLSELECTED ( 'Top-Lagerführend'[Bezeichnung] ),
[DB3_Top],
,
DESC,
DENSE
),
""
)
VAR __Table =
ADDCOLUMNS ( 'Top-Lagerführend', "__Ranking", Ranking )
VAR SUMU =
CALCULATE (
SUM ( 'Top-Lagerführend'[DB3] ),
(
SELECTCOLUMNS (
FILTER ( __Table, [__Ranking] <= 500 ),
"Bezeichnung", 'Top-Lagerführend'[Bezeichnung]
)
)
)
RETURN
SUMU
VAR Points_Top_Lager is checking if all the filters i have a either true or not true, because i only want to rank if evreything is true.
My Problem is, i want to use this measure to display the total sum in a card visuel.
And it's not working.
I think its because if the haseonevalue.
Because if add "Bezeichnung" in a tabel visuel its working.
So, what would be the correct soulution?
Hi @Yonah - It is a little hard to follow your logic, so is it possible to upload a file with anonymous/masked data?