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
Varpat
Frequent Visitor

INCORRECT MATRIX TOTAL

Hi Everyone,

 

When i used the below dax unfortunately my previous month sales or any time before my selection of may 2023 is not coming

Sum of all sales_Value =
DIVIDE(
    SWITCH(
        TRUE(),
        VALUES('Sheet1'[Currency]) = "USD Dynamic", SUM(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE_USD]),
        VALUES('Sheet1'[Currency]) = "Local Currency", SUM(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE]),
        VALUES('Sheet1'[Currency]) = "USD Budgeted",
            SUMX(
                V_NIELSEN_FACT_SALES_SUMMARY_TABLE,
                V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE]
                    * CALCULATE(
                        AVERAGE(DIM_FOREX[FOREX]),
                        USERELATIONSHIP(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[Brand Key Forex], DIM_FOREX[Key])
                    )
            ),
        BLANK()
    ),
    1000000
)
1 REPLY 1
grazitti_sapna
Resolver I
Resolver I

Hi @Varpat 

You can try using this:-

Sum of all sales_Value =
DIVIDE(
SWITCH(
TRUE(),
VALUES('Sheet1'[Currency]) = "USD Dynamic", SUM(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE_USD]),
VALUES('Sheet1'[Currency]) = "Local Currency", SUM(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE]),
VALUES('Sheet1'[Currency]) = "USD Budgeted",
SUMX(
V_NIELSEN_FACT_SALES_SUMMARY_TABLE,
V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE]
* CALCULATE(
AVERAGE(DIM_FOREX[FOREX]),
USERELATIONSHIP(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[Brand Key Forex], DIM_FOREX[Key])
)
),
BLANK()
),
1000000
) + CALCULATE(
SUM(V_NIELSEN_FACT_SALES_SUMMARY_TABLE[SALES_VALUE]),
PREVIOUSMONTH('Date'[Date])
)

I hope this will help.
Thank You.

 

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.