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! Get ahead of the game and start preparing now! Learn more
Does someone know how I can split a measure just using DAX? I have a measure from my database with two values (value A and B), I want to create two seperate measures from that single measure. Measue A and Measure B, does someone know how to do this in DAX?
Example: measure X contains the values ABC and XYZ
I want to calculate the revenue for value ABC and XYZ and then also calculate the difference between them. Therefore I need ABC and XYZ in two seperate measures.
Anybody with a suggestion for this problem?
P.s. I'm working with a live connection, so I can't make changes into my database.
Solved! Go to Solution.
@Gjakova , measure like ?
New York= calculate(sum(Table[revenue]),filter(table,table[city]="New York"))
Los Angeles= calculate(sum(Table[revenue]),filter(table,table[city]="Los Angeles"))
diff = [New York] - [Los Angeles]
@Gjakova , what do mean by split here
there are so many functions to deal with text
https://docs.microsoft.com/en-us/dax/text-functions-dax
It needs to done on row context like
countx(table, if(left(Table[col],2) ="AB",Table[Val1],Table[Val2]))
sumx(table, if(left(Table[col],2) ="AB",Table[Val1],Table[Val2]))
Hi @amitchandak thank you for your reply.
I think that measure is incorrect (?)
What I mean is this, I have a column that shows the following:
| City |
| New York |
| Los Angeles |
And I have another column with revenue.
I want to create a measure which calculates all the revenue from New York and another measure which calculates the revenue from Los Angeles.
Furthermore, I would like to show the difference in revenue between New York and Los Angeles. But for that I could just use the measure of New York minus the measure of Los Angeles.
But I can't get the first two measures to work, but in my mind I think it should be very simple, but I can't figure it out why it does not work.
@Gjakova , measure like ?
New York= calculate(sum(Table[revenue]),filter(table,table[city]="New York"))
Los Angeles= calculate(sum(Table[revenue]),filter(table,table[city]="Los Angeles"))
diff = [New York] - [Los Angeles]
Thank you, that's it.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 46 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 126 | |
| 102 | |
| 68 | |
| 51 |