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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to get the difference between two days column with one column having dynamic value

deekshasingh_0-1603116470018.png

Hi all,

I have made two columns, no. of days which is the difference between start date and end date and the total number of days, the first value in total number of days is the total of no. of days, the second value is the difference between total days and no. of days but the third value should come from the new total days -  no. of days and so on. I made a calculated column which is

SUM([No. of days])- 'ABCTable'[No. of days], but this is calculating the new values always as 2586-30, 2586-31, not as shown in the excel, it should calculate as 2586-30 for first value and 2556-31 for second  value, can anybody help me please.
Any help will be appreciated.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @deekshasingh,

Sounds like a mobile calculation requirement, maybe you can try to set the filter condition no less than or equal to the current index, then these calculations should be rolling in the current and previous records.

If you are still confused about the encoding formula, please share some dummy data then we can try it.

How to get answers to your question quickly
Best regards

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hello @deekshasingh,

Sounds like a mobile calculation requirement, maybe you can try to set the filter condition no less than or equal to the current index, then these calculations should be rolling in the current and previous records.

If you are still confused about the encoding formula, please share some dummy data then we can try it.

How to get answers to your question quickly
Best regards

Xiaoxin Sheng

lbendlin
Super User
Super User

For each "row" in your virtual table (filter context) you need to compute all previous "row" values since they depend on each other.

 

Provide sample data in usable form and show expected outcome so we can suggest an appropriate aggregation function (like SUMX) to accomplish that.

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.

Top Solution Authors