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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors