Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
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! | |
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 |
|---|---|
| 61 | |
| 58 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 118 | |
| 38 | |
| 36 | |
| 29 |