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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

SUMX Iterating over 2 years

Hi all,

 

I have following problem on this Data model. sample

The measure Effect Product_ALLEX = SUMX(
SUMMARIZE (
    'Sales',
    'Calendar'[***Quarter],
    'CDW C_MARKET_HIERARCHIES_ALL_V'[LEVEL4],
    'CDW C_PRODUCTS_V'[PROD_CD]   
),[Delta Units]*[Price Diff PY Product - Brand_ALLEX])

 

is working liked wished.

The problem is that obviously SUMX is not executed for a code which have only existed in previous Year quarter but not in selected one. E.g ‘20552’ in Finland. Any hints how I can adjust the SUMX iterator so it that it would calculate for 'PROD_CD' which have values in selected quarters and in corresponding previous year quarters?

 

Thanks a lot in advance

 

BR

Nico

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi NicoD82,

 

To be general, maybe you can try formula below:

 

Effect Product_ALLEX =
CALCULATE (
    SUMX (
        SUMMARIZE (
            'Sales',
            'Calendar'[***Quarter],
            'CDW C_MARKET_HIERARCHIES_ALL_V'[LEVEL4],
            'CDW C_PRODUCTS_V'[PROD_CD]
        ),
        [Delta Units] * [Price Diff PY Product - Brand_ALLEX]
    ),
    ALLSELECTED ( 'CDW C_PRODUCTS_V'[PROD_CD] )
)

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi Jimmy Tao,

 

thanks for your suggestion. Unfortunately this doesn't give me the expected result. The iterator for SUMX should just consider Codes from previous year as well. It sounds so simple but I didn't find a way to achieve it...

 

BR

Nico

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.