Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Yonah
Helper II
Helper II

How to get total value?

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?

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @Yonah - It is a little hard to follow your logic, so is it possible to upload a file with anonymous/masked data?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.