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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RafiQLB
Regular Visitor

Probléme des totaux sur une Matrice

Bonjour la communauté Power BI,

 

Je voudrais avoir votre support pour fixer le total sur une matrice, en effet :

 

j'ai uneles mesures calculées en DAX ci-après :

A:Somme(Qté_Achetée)

B : Somme (Qté_Vendue)

C : Ecart = Somme(Qté_Achetée) - Somme(Qté_Vendue)

Par la suite, j'ai calculé 2 autres mesures :

Ecart (-) : Somme(Ecart), Si(Ecart < 0)

Ecart (+) : Somme(Ecart), Si(Ecart > 0)

En fait je me retrouve pas avec des bons totaux (-) et totaux (+) sur la matrice.

 

Si quelqu'un parmi vous pourrait me suggérer une solution.

Excellente journée

8 REPLIES 8
v-hashadapu
Community Support
Community Support

Hi @RafiQLB , 

How are you? I hope you're doing well. I wanted to remind you to provide the necessary details, as we're unable to assist with your issue without them.

Thank you.

v-hashadapu
Community Support
Community Support

Hi @RafiQLB , Hi, it's been a while since we last heard from you. We are ready to assist you with resolving the issue, but we need the necessary details from you. Kindly share the information required so we can better understand and address your issue.

v-hashadapu
Community Support
Community Support

Hi @RafiQLB , Hope you are doing well. Just a remainder regarding the sample data and the rest of the details we need to help you solve this issue.

RafiQLB
Regular Visitor

Hello Power BI community,

 

I would like your help in setting the total on a matrix. Indeed:

I have the following measures calculated in DAX:

1. Total Purchase Quantity: SUM (Purchased Quantity)

2. Total Sold Quantity: SUM (Sold Quantity)

3. TOTAL VARIANCE: SUM (Purchased Quantity) - SUM (Sold Quantity)

Subsequently, I calculated two other measures:

NEG TOTAL VARIANCE (-): SUM(TOTAL VARIANCE), IF (SUM(TOTAL VARIANCE) < 0)
POS TOTAL VARIANCE (+): SUM(TOTAL VARIANCE), IF (SUM(TOTAL VARIANCE) > 0)

Actually, I don't end up with correct grand totals (-) and totals (+) at the bottom of the matrix. Additionally, if I display both measurements on two displays, it gives me a single value, depending on the result: (-/+).

Can anyone suggest a solution?

 

Have a great day!

Hi @RafiQLB , Thank you for reaching out to the Microsoft Community Forum.

 

As suggested by @lbendlin,  please provide more information, including a few key details about your data model, so we can give you an accurate solution. Specifically, let us know which table and column are used for the matrix rows, whether TOTAL VARIANCE is a measure or a calculated column and whether Purchased Quantity and Sold Quantity come from the same table or from different ones. It's also important to know if you're working with a flat table or a star schema that includes related dimension tables such as Products or Dates and whether there are any slicers or filters applied that could affect the results. Lastly, please confirm which table contains the actual transactional data and if possible, provide sample data for us to work on.

 

For general understanding, please refer:

Measures in Power BI Desktop - Power BI | Microsoft Learn

SUMX function (DAX) - DAX | Microsoft Learn

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

FBergamaschi
Solution Sage
Solution Sage

Please can you translate in English? I also would suggest to go to the DAX forum

@FBergamaschi you can select the entire text, then right click it, and have your browser translate to English.

 

lbendlin_0-1752409464043.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.