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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rshaw1768
Regular Visitor

Subtracting a cell value from a another cell (measure) in a single column

Hello Guys,

 

I want to create a column/Measure which yields the difference between alternate columns.

dsad.PNG

Like the difference in Votes between Rank 1 & Rank 2 will show in Row 1 & So on.

The Last Row will be zero or same as no of votes for Rank 18.

 

If anyone has some idea regarding this, please share your views.

 

Thank You.

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @rshaw1768,

 

You can create a calculated column below: 

 

Diff = IF('Table1'[Rank]=MAX('Table1'[Rank]),0,Table1[Votes]-LOOKUPVALUE('Table1'[Votes],'Table1'[Rank],'Table1'[Rank]+1))

 

q5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

If you want a measure, share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-qiuyu-msft
Community Support
Community Support

Hi @rshaw1768,

 

You can create a calculated column below: 

 

Diff = IF('Table1'[Rank]=MAX('Table1'[Rank]),0,Table1[Votes]-LOOKUPVALUE('Table1'[Votes],'Table1'[Rank],'Table1'[Rank]+1))

 

q5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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