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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
KIT_LKN
Frequent Visitor

Matrix total is wrong - SUMX doesn't work

Have written a dax, and put it in to my matrix. All values are correct, marked with blue V in picture below.

But the Total, marked out with red, is clearly not correct. Have tried SUMX and VALUES, but it still isn't correct.

 

Totals driving Me Mad = 
IF(
CALCULATE(
    SUM(Table1[ValuesColumn201]),
    FILTER(
        Table1,
        Table1[ValuesColumn201] = 1)), 

    SUMX 
    (Table1, 
     Table1[ValuesColumn300] *0.85/100 +
    (Table1[ValuesColumn301] *22/100) ) *0.2, 0)

DaxDrivingMeMad.PNG

1 ACCEPTED SOLUTION

Thanks for responding to my question. 

I'm using a company data model, and I'm not allowed to add as much detailed information as I want to. That's what that black paint all about.

 

Meanwhile I've figured out, as you have ponted out, that the error is in the "IF"-bit. I've removed that part from the measure, and added it to a separate column. And I've also added a return statement for what will happen when the value is not 1 (, blank()). And now, when I combine this, the total is correct. 😊 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@KIT_LKN , If the condition is not correct or incomplete. With current information not able to suggest new one

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks for responding to my question. 

I'm using a company data model, and I'm not allowed to add as much detailed information as I want to. That's what that black paint all about.

 

Meanwhile I've figured out, as you have ponted out, that the error is in the "IF"-bit. I've removed that part from the measure, and added it to a separate column. And I've also added a return statement for what will happen when the value is not 1 (, blank()). And now, when I combine this, the total is correct. 😊 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.