Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |