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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SebSchoon1
Post Patron
Post Patron

Get Total Values at row level And Total value at columns Level After MOD() fucntion

Hi Guys,

 

Thanks to the community i can learn so many things! Thank you!

 

I would like to get the total of decimal part in my Table

 

But also Keep in rows a specific value.

 

Here is my table

 

SebSchoon1_0-1663928681802.png

 

my model

SebSchoon1_1-1663928962136.png

 

 

a link to my file

 

https://we.tl/t-KwOgHOZDJF

 

1 ACCEPTED SOLUTION

Hello @v-rzhou-msft 

 

I Managed it by doing

 

reliquat total = VAR REL= [(1)Nombre décimal Répartition]

                  VAR TOTREL = CALCULATE([(1)Nombre décimal Répartition],REMOVEFILTERS('Tableau Dispatch'[CODE DEPOT]))

                  return if([Répartition]<>BLANK(),TOTREL,BLANK())

Which is maybe not the optimal way to do ^^

 

But it worked !

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@SebSchoon1 Not sure I am following, is the total in your table incorrect? If that is the case, This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  Hi Sir,

 

I'd like to have in the rows a value of 2  (which is decimal part of répartition * [Total Dépots])

 

And have a total of 4 since the two items have a total residue quantity of 2 

 

so 2 + 2 = 4

 

🙂

Hi @SebSchoon1 ,

 

Here I suggest you to try this code.

correct total =
SUMX (
    SUMMARIZE (
        ADDCOLUMNS (
            'Tableau Dispatch',
            "code", RELATED ( 'Base Article'[CODE ARTICLE] )
        ),
        [CODE ARTICLE],
        [CODE DEPOT]
    ),
    [partie décimale répartition]
)

Result is as below.

RicoZhou_0-1664183666589.png

 

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.

Hello @v-rzhou-msft 

 

I Managed it by doing

 

reliquat total = VAR REL= [(1)Nombre décimal Répartition]

                  VAR TOTREL = CALCULATE([(1)Nombre décimal Répartition],REMOVEFILTERS('Tableau Dispatch'[CODE DEPOT]))

                  return if([Répartition]<>BLANK(),TOTREL,BLANK())

Which is maybe not the optimal way to do ^^

 

But it worked !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.