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
Elie_HUCHET
Helper II
Helper II

Table total formula problem

Hello,

I have a problem regarding my formula in an array. When I am on my Chartre de Bretagnes site, my calculation works perfectly. Unfortunately, when I change the Vannes example site, it seems that the formula does not agree with the total.

 

La formule est la suivante:

Bennes manquantes 2 = if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co]))

 

Thank you for your help

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Elie_HUCHET , You have use visual column to rebuild total

 

Bennes manquantes 2 = Sumx(values(Table (2)[Column]) , if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co])) )

 

or refer this video

https://www.youtube.com/watch?v=ufHOOLdi_jk

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

View solution in original post

Hi @Elie_HUCHET ,

 

IF function will return values based on true or false, so you won't get total as you want. amitchandak 's reply should be a workaround, you need to use keycolumn in your visual to calculate the sum based on [Bennes manquantes 2] measure instead of the measure code.

Measure with correct subtotal = SUMX(VALUES('TableName'[Keycolumn]),[Bennes manquantes 2])

The calculation is based on your data model.  If this reply still couldn'y help you solve your problem, please share a sample file with me and show me a screenshot with the result you want.

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
Elie_HUCHET
Helper II
Helper II

Thank you for your reply I found a solution!! 🙂 

Elie_HUCHET
Helper II
Helper II

Hello, thank you for your answer but it doesn't work. Have you got on other idea?

Hi @Elie_HUCHET ,

 

IF function will return values based on true or false, so you won't get total as you want. amitchandak 's reply should be a workaround, you need to use keycolumn in your visual to calculate the sum based on [Bennes manquantes 2] measure instead of the measure code.

Measure with correct subtotal = SUMX(VALUES('TableName'[Keycolumn]),[Bennes manquantes 2])

The calculation is based on your data model.  If this reply still couldn'y help you solve your problem, please share a sample file with me and show me a screenshot with the result you want.

 

Best Regards,
Rico Zhou

 

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

amitchandak
Super User
Super User

@Elie_HUCHET , You have use visual column to rebuild total

 

Bennes manquantes 2 = Sumx(values(Table (2)[Column]) , if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co])) )

 

or refer this video

https://www.youtube.com/watch?v=ufHOOLdi_jk

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

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.