This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello Experts,
Data:
Expected Result:
- Calculate sum of Sales only if Units is not blank
- Sales Sum = 10 + 20 + 40 = 70; Sales = 30 for XYZ is skipped since Units is blank for it
I'm using below dax in calculated measure but it is not working:
Solved! Go to Solution.
@atult 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
Hi @atult ,
Try below dax:
Total Sales =
CALCULATE(
SUM('Sales_Table'[Sales]),
'Sales_Table'[Units] <> BLANK()
)
For ease of Filtered Measure DAX, you can directly go to quick measure -> filtered value and then change your dax accordingly.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
Hi @atult ,
Try below dax:
Total Sales =
CALCULATE(
SUM('Sales_Table'[Sales]),
'Sales_Table'[Units] <> BLANK()
)
For ease of Filtered Measure DAX, you can directly go to quick measure -> filtered value and then change your dax accordingly.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
@atult Perhaps try this:
Total Sales = IF(SUM('Sales_Table'[Units]) <= 0,BLANK(),SUM('F_ORDERED Sales_Table'[Sales]))
@atult 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
@Greg_Deckler ,
Tried the below but not helping:
Total Sales =
IF(
HASONEFILTER(Sales_Table[Category]),
IF(
SUM(Sales_Table[Units]) = BLANK(),0,SUM(Sales_Table[Sales])
),
SUMX(
FILTER(Sales_Table,
[Units]>1000
),
[Sales]
)
)
@atult Keep your original measure. Create a new measure:
Total Sales =
IF(
HASONEFILTER(Sales_Table[Category]),
[Original Measure],
SUMX(SUMMARIZE('Table',[Category],"__Sales",[Original Measure]),[__Sales])
)
For Measure Totals to work, you have to summarize or summarizecolumns or groupby your data exactly as it is in the visual and then use an X aggregator across that summarized table.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 42 | |
| 41 | |
| 21 | |
| 18 |