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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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