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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Yonah
Helper II
Helper II

Matrix with Grandtotla for higher hierarchy

Hi, 

Unfortunately, so far I have not found the right solution or idea, or I have forgotten it.
My Dax is this:

 

 

Lager_Wert =
VAR Bezeichnung =
    SELECTEDVALUE ( '03 ExportData_EvaluateChannelPrice'[Bezeichnung] )
VAR Produktfam =
    SELECTEDVALUE ( '03 ExportData_EvaluateChannelPrice'[Produktfam] )
VAR Lager =
    SELECTEDVALUE ( '08 Lagerwert'[Lager] )
RETURN
    SWITCH (
        TRUE (),
        ISINSCOPE ( '03 ExportData_EvaluateChannelPrice'[Bezeichnung] ),
            CALCULATE (
                SUM ( '08 Lagerwert'[Anzahl] ),
                FILTER (
                    ALLSELECTED ( '03 ExportData_EvaluateChannelPrice' ),
                    Bezeichnung = '03 ExportData_EvaluateChannelPrice'[Bezeichnung]
                )
            )
                * CALCULATE (
                    SUM ( '03 ExportData_EvaluateChannelPrice'[Bewertungspreis] ),
                    FILTER (
                        ALLSELECTED ( '03 ExportData_EvaluateChannelPrice' ),
                        Bezeichnung = '03 ExportData_EvaluateChannelPrice'[Bezeichnung]
                    )
                ),
        ISINSCOPE ( '03 ExportData_EvaluateChannelPrice'[Produktfam] ),
            CALCULATE (
                SUM ( '08 Lagerwert'[Anzahl] ),
                FILTER (
                    ALLSELECTED ( '03 ExportData_EvaluateChannelPrice' ),
                    Produktfam = '03 ExportData_EvaluateChannelPrice'[Produktfam]
                )
            )
                * CALCULATE (
                    SUM ( '03 ExportData_EvaluateChannelPrice'[Bewertungspreis] ),
                    FILTER (
                        ALLSELECTED ( '03 ExportData_EvaluateChannelPrice' ),
                        Produktfam = '03 ExportData_EvaluateChannelPrice'[Produktfam]
                    )
                ),
        ISINSCOPE ( '08 Lagerwert'[Lager] ),
            CALCULATE (
                SUM ( '08 Lagerwert'[Anzahl] ),
                FILTER ( ALLSELECTED ( '08 Lagerwert' ), Lager = '08 Lagerwert'[Lager] )
            )
    )

 

 

My Problem is, for is ISINSCOPE ( '03 ExportData_EvaluateChannelPrice'[Produktfam] and ISINSCOPE ( '08 Lagerwert'[Lager] ). 
 I dont want to multiply the Values I want the Grandtotals coming from ISINSCOPE ( '03 ExportData_EvaluateChannelPrice'[Bezeichnung] ) for Produktfam and Grand Total Coming from Produktfam for Lager.

Unfortunately I can't upload a picture of the current result.

So here is a table with the current result of my meassure and the result I want. 

 

HierarchieAnzahlBewertungspreisLagerwert (My Meassure)

What I want

Lager 1180264680650
Produktfarm 11001100100
  Bezeichnung 11001100100
 Produktfarm 280252000550
 Bezeichnung 1705350350
 Bezeichnung 201000
 Bezeichnung 32010200200

 

Many thanks in advance! 

 

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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