Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
| Account Name | Date | Amount |
| Rev | 12-Jun-18 | 430 |
| Exp | 13-Aug-17 | 250 |
| Margin | 2-Mar-17 | 0 |
| Rev | 12 July 18 | 400 |
| Exp | 13-Aug-17 | 300 |
I have a table where I need to create a calculated measure based on the below logic
If the Account Name <> 'Margin' then Sum of amount
if the Account Name = "Margin' then Sum of amount =
Sum of Amount when account name is 'Rev' - Sum of Amount when account name is 'Exp'
Regards
Hitesh
Hi. Can you explain a bit more your idea? i don't understand why <> marin or = margin both result in sum of amount. The third line should something like: (i think variables can help to get better undestanding)
VAR amount_rev = CALCULATE (
SUM (Table[Amount] ) ,
Table[Name] = "Rev"
)
VAR amount_exp = CALCULATE (
SUM (Table[Amount] ) ,
Table[Name] = "Exp"
)
RETURN
amount_rev - amount_expHope this helps
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Happy to help!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |