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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jakepowers21
Frequent Visitor

Difference Between two columns

I am attempting to calculate the difference between two columns and can't seem to get the correct numbers. I would like: Aging Bucket = 'Days to Pay' - 'Aging'. Please see attached reports and the fomula created. 

 

jakepowers21_0-1649969860426.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @jakepowers21 ,

 

Not sure what your data model is. Please try this measure.

Aging Bucket = MAX('Vendor Payment Assumptions Combined Power BI'[Days to Pay])-MAX('Document Dates'[Aging])

 

If this doesn't work for you or I misunderstand your needs, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

How to provide sample data

How to Get Your Question Answered Quickly

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

jakepowers21
Frequent Visitor

Yes, the fist line on the table have the following values: 'Days to Pay' = 30, 'Aging' = 36. I am trying to simply create a calculation to show me the difference between the two numbers, 30-36=-6 (Aging Bucket). However, the result that I am getting for the aging bucket is -2,796. I believe it is taking the sum of multple rows of data, but I would like it specific for that row and the results should be -6. I just can't seem to figure out how to correct this. The 'Days to Pay' and 'aging' fields are from different tables, which im not sure if that is effecting the result of the calulated forumla. 

The following is the current calulated column that is showing the inccorect result:

Aging Bucket = SUM('Vendor Payment Assumptions Combined Power BI'[Days to Pay])-SUM('Document Dates'[Aging])

amitchandak
Super User
Super User

@jakepowers21 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

 

In case you need a bucket

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.