Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi all,
Dealing with the following 2 issues (Attached a PBI example file).
https://drive.google.com/file/d/1nS1GFH3AEwInsue-yF1ORiepCEOe2Ky5/view?usp=drive_link
Thank you in advance,
Solved! Go to Solution.
Hi @Msampedro ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. Fixed the measure for now.
I am including .pbix file for your better understanding, please have a look into it:
Thank you.
Hi @Msampedro ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
Hi @Msampedro ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. Fixed the measure for now.
I am including .pbix file for your better understanding, please have a look into it:
Thank you.
Hi @Msampedro
Ensure both measures return numeric values in all contexts.
For the difference measure (Sales ACT vs Theorical), define as a proper measure:
Sales ACT vs Theorical =
[Actual Sales] - [Theorical Sales]
Use a combo chart:
X-axis = Date or Category
Column = Actual Sales
Line = Theorical Sales or Sales ACT vs Theorical
If still not visible:
Verify the data type in the model is numeric (Decimal Number / Whole Number)
Remove filters temporarily to check if slicers are hiding data
1️⃣ Adapt “Actual Consumption” to show totals in a Matrix
The problem is usually that the measure works per row, but Power BI doesn’t automatically sum it at the total level. The solution is to detect whether you are at the row level or total level using HASONEVALUE() (or ISINSCOPE()), then calculate accordingly.
Pattern for totals:
Actual Consumption Total =
IF(
HASONEVALUE('Table'[Plant]), -- Or the field used for rows
[Actual Consumption], -- Your original row-level calculation
SUMX(
VALUES('Table'[Plant]), -- Iterate over all plants
[Actual Consumption] -- Sum the original measure
)
)
Alternative using ISINSCOPE (modern approach):
Actual Consumption Total =
IF(
ISINSCOPE('Table'[Plant]),
[Actual Consumption],
SUMX(
ALL('Table'[Plant]),
[Actual Consumption]
)
)
✅ This ensures the Matrix totals display correctly, summing across all plants or categories.
---
2️⃣ Visualizing 3 measures correctly
Assuming your 3 measures are:
1. Actual Consumption
2. Theorical Sales
3. Sales ACT vs Theorical
Step 1: Choose the right chart type
Measure Recommended Visual Notes
Actual Consumption Column chart Displays absolute values per category (Plant, Date, etc.)
Theorical Sales Line or Column Use a combo chart with Actual Consumption as column, Theorical as line
Sales ACT vs Theorical Line or Bar (secondary axis optional) Can be plotted as difference line on the same combo chart
---
Step 2: Use a Combo Chart for all 3 measures
1. X-axis: Category (Plant, Month, or Date)
2. Column values: Actual Consumption + Theorical Sales (stacked or side-by-side)
3. Line value: Sales ACT vs Theorical (difference measure)
4. Y-axis: You may use dual axis if scales differ
5. Formatting:
Show data labels on columns
Use color coding: Blue = Actual, Grey = Theorical, Red = Difference
---
Step 3: Test measures individually
Always validate each measure using a Card visual.
Ensure all measures return numeric values, not blanks.
Once confirmed, they’ll render correctly in the combo chart.
---
Bonus Tip for Matrix Totals
If you also need Theorical Sales totals in the Matrix:
Theorical Sales Total =
IF(
ISINSCOPE('Table'[Plant]),
[Theorical Sales],
SUMX(
ALL('Table'[Plant]),
[Theorical Sales]
)
)
Same logic applies to any calculated measure.
This pattern fixes totals for measures that are row-level calculations or calculated differences.
Thanks @Nabha-Ahmed
Regarding the visual, I believe the issue is the "Theorical Sales" measure, as it seems not capable to be visualized. At the below capture you can see it is blank.
Let me know if any idea to solve it.
Thanks a lot!
Miguel
The issue is comming from your mesasure:
Theorical Sales"
Theorical Sales = [Unique Qty]*SELECTEDVALUE('2. Renault Price List'[Price DAP €/kg])
If you add a table with this field and select a value, you will have value in your matrix:
For the issue with Consumption actual vs Theorical, you used a conditional formatting which is hidding your value
If I removed it, I get some values
Do not hesistate to ask if you need more support to fix these issues
Thanks @Cookistador
Regarding the measure "Actual consumption" - Do you know how I can adapt the formula to see the totals?
Also - Do you know how to correctly visualize the below 3 measures?
Many thanks,
Miguel
hI @Msampedro
Use IN...VALUES instead of = SELECTEDVALUE
Unique Qty =
VAR _Raw = VALUES ('Material Mapping'[GMC])
RETURN
IF(
ISINSCOPE('Material Mapping'[Billing GMC])
|| ISINSCOPE('Material Mapping'[Billing GMC description]),
BLANK(), -- Hide duplicates for each Billing GMC
CALCULATE(
SUM('Qty ACT QP1'[Quantity_in_Entry_Unit]),
'Qty ACT QP1'[GMC] IN _Raw
)
)
There’s already a relationship between your fact and dimension tables, so why use a measure that just filters based on slicer selections? The relationship should handle that filtering automatically when you pick something in the slicer.
Thanks @danextian
I am using a measure to avoid the below (duplicates at Billing GMC description level).
I have tried with VALUES instead of SELECTEDVALUES and I have received the below message. Let me know if any other idea! Many thanks
did yo use IN _Raw or = _Raw?
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |