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
Laura7
New Member

Incorrect Total of measure column

Hello,

I have some problems with the sum of a measure column. This is my table:

Laura7_0-1713514124142.png

As you can see here, Total of the Overview column is not added up correctly.
I calculate my Actuals column as follows:

Actuals = SUMX(FILTER('TabelleSales', 'TabelleSales'[Typ] = "A"), 'TabelleSales'[Sales])

The DP column like this:

DP = SUMX(FILTER('TabelleSales', 'TabelleSales'[Typ] = "DP"), 'TabelleSales'[Sales])

And the Overview column has this formula:

Overview = If([Actuals]<[DP],[DP],[Actuals])

Can someone please help me?

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi, I am not sure how your semantic model looks like, but please try something like below.

Overview fix =
SUMX (
    SUMMARIZE (
        fact_table,
        product[product],
        calendar[Jahr],
        calendar[Month name],
        calendar[Month name order]
    ),
    IF ( [Actuals] < [DP], [DP], [Actuals] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

v-tianyich-msft
Community Support
Community Support

Hi @Laura7 ,

 

Thanks for @Jihwan_Kim  solution, if you want to use calculated columns, you can just change the DAX to calculated columns in the original DAX, you can check the result below:

vtianyichmsft_0-1713768359208.png

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-tianyich-msft
Community Support
Community Support

Hi @Laura7 ,

 

Thanks for @Jihwan_Kim  solution, if you want to use calculated columns, you can just change the DAX to calculated columns in the original DAX, you can check the result below:

vtianyichmsft_0-1713768359208.png

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Jihwan_Kim
Super User
Super User

Hi, I am not sure how your semantic model looks like, but please try something like below.

Overview fix =
SUMX (
    SUMMARIZE (
        fact_table,
        product[product],
        calendar[Jahr],
        calendar[Month name],
        calendar[Month name order]
    ),
    IF ( [Actuals] < [DP], [DP], [Actuals] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.