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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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