Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Varez42
New Member

Subtracting from same column and then add up the difference

Varez42_0-1678877199949.pngI have data kind of similar to this excel file in the PQ, I would like to get the difference of value column between sent and reci(att column) for each unique event ID

I was able to get that where for a the measure would be 10 and for b it would be 15 and for c 0 but the total is not adding up as it should be 25 
I am trying to calculate it like this

Varez42_0-1678897116005.png

Varez42_1-1678897136044.png

 

 



Can some one help me with this,please?

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Varez42 

please try

=
SUMX ( 'Table', IF ( 'Table'[att] = "reci", - 'Table'[Value], 'Table'[Value] ) )

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Varez42 

please try

=
SUMX ( 'Table', IF ( 'Table'[att] = "reci", - 'Table'[Value], 'Table'[Value] ) )

Varez42
New Member

HI @KeyurPatel14 
thanks for the response, 
So based on the above data , I am trying something like this but as you can see the total should be 50 but it is not .

Varez42_0-1678887942160.png

Varez42_1-1678887961784.png

 

KeyurPatel14
Responsive Resident
Responsive Resident

Hi @Varez42 ,
Can you please provide sample output for better understanding?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.