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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everyone, i have as i believe a simple question.
I have a ddbb with a small structure (only this columns: account(revenue and expenses), type (there are 3 types, actual, plan and last year), and ammount $). I need to create a calculate field who gave me the account (revenue) but only when the type is actual. the idea is multiply that new calculated field *-1 because its a negative value in the ddbb. There is possible to do this?
Thanks in advance
Solved! Go to Solution.
Hi! I created some dummy data to demonstrate what I did:
With this data I then created the following measure:
TotalRevenueActual :=
CALCULATE(
SUM('YourTableName'[Amount]),
'YourTableName'[Account] = "Revenue",
'YourTableName'[Type] = "Actual"
)
The results:
And, -100 is accurate as it is the amount where Account is Revenue and Type is Actual. Hope this helps!
Another option would be in Power Query - you can pivot the data so that Revenue and Expense are two different columns.
Proud to be a Super User! | |
Hi! I created some dummy data to demonstrate what I did:
With this data I then created the following measure:
TotalRevenueActual :=
CALCULATE(
SUM('YourTableName'[Amount]),
'YourTableName'[Account] = "Revenue",
'YourTableName'[Type] = "Actual"
)
The results:
And, -100 is accurate as it is the amount where Account is Revenue and Type is Actual. Hope this helps!
Another option would be in Power Query - you can pivot the data so that Revenue and Expense are two different columns.
Proud to be a Super User! | |
Hi Audreygerred, thanks a lot. it probably will work!
Regards
No problem! Happy to help! Also, I forgot to mention the handling of the negative. I adjusted the DAX below:
Proud to be a Super User! | |
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 42 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 122 | |
| 106 | |
| 47 | |
| 30 | |
| 24 |