Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello everyone,
I would like to write a measure where it calculates the sum of only the positive values of other measure.
Thank you very much for your support.
Best regards
Tito
∆ Sales (positive) =
VAR SalesPrev =
CALCULATE([Sum Sales],
OFFSET(
-1,
ALLSELECTED('Table'[Date],'Table'[Product]),
ORDERBY('Table'[Date]),
DEFAULT,
PARTITIONBY('Table'[Product])
)
)
VAR Sales2 = IF(NOT ISBLANK(SalesPrev), [Sum Sales] - SalesPrev)
RETURN
CALCULATE(
SUMX(
'Table',
IF(Sales2 > 0, Sales2, BLANK())
),
FILTER(
'Table',Sales2 > 0
)
)
Rsult
Solved! Go to Solution.
Hi,
PBI file attached.
Hope this helps.
Hi,
Share the download link of the PBI file.
Hi,
Thank you very much for your support, it has helped me a lot.
I need to do some more calculations, could you please help me further. The result should look like the picture below.
Data:
Result:
Best regards
Tito
I have already got the result you wanted. Replicate the same logic for the other measures as well.
You are welcome.
Hi @Ashish_Mathur
Can you please show me how to split a .pbix file? Thank you
Best regards
Hi @Tito ,
I tried to get what you mean and I also want to create a .pbix file to satisfy your requirements, but I can not do that. Can you provide me your .pbix file or more details about your problems?
It seems that [Sum Sales] is a measure, so please tell me more things about it.
Best Regards
Yilong Zhou
Hi @Anonymous ,
Data
Result:
Hi @Anonymous
Can you please show me how to split a .pbix file? Thank you
Best regards
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 83 | |
| 70 | |
| 38 | |
| 28 | |
| 26 |