Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I'm trying to calculate a measure e.g Total Profit = Calculate(Sum('Salesdata'[Profit]), ('Salesdata' [State] = "Vic")). I've realised that have some of the data has negative values ie (Loss). I want to sum all the Total Profit in a new measure with only profit values >0. I want to exclude all the 'loss' values as it affects my new measure by decreasing the total amount.
I have used this formula
Total Profit =
VAR profit = Calculate(Sum('Salesdata'[Profit]), ('Salesdata' [State] = "Vic"))
RETURN (profit>0)
Please help..
Solved! Go to Solution.
Hi,
I am not sure how your data mode looks like, but please try to create the measure similar to the below.
thanks.
Total Profit only positive and Vic : =
VAR _newtable =
FILTER ( Salesdata, Salesdata[Profit] > 0 && Salesdata[State] = "Vic" )
RETURN
SUMX ( _newtable, Salesdata[Profit] )
Hi,
I am not sure how your data mode looks like, but please try to create the measure similar to the below.
thanks.
Total Profit only positive and Vic : =
VAR _newtable =
FILTER ( Salesdata, Salesdata[Profit] > 0 && Salesdata[State] = "Vic" )
RETURN
SUMX ( _newtable, Salesdata[Profit] )
| User | Count |
|---|---|
| 56 | |
| 41 | |
| 38 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 103 | |
| 63 | |
| 36 | |
| 35 |