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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
giulio1986
Regular Visitor

Calculate values between range of days for specific periods

Hello
I have a scenario I find difficulty finding a proper calculation logic. 
In the table below I have periods which typically start on a 19 in a month and end on the 19 or 20 the next month. 
I have a continuous date column, a StartDate and EndDate for the period and also an EndOfMonth I added in PowerQuery based on the Date column.
In the example below:
How could we calculate the value between StartDate and EndOfMonth for period 3 for instance?
For the range of days between 20-03-23 and 31-03-23?
Period 3 Total is 36.600
The range should give 14100.

PeriodNameDateStartDateEndDateEndOfMonth Value 
Period201/03/202320/02/202319/03/202331/03/2023           1.200
Period202/03/202320/02/202319/03/202331/03/2023           1.250
Period203/03/202320/02/202319/03/202331/03/2023           1.100
Period204/03/202320/02/202319/03/202331/03/2023           1.200
Period205/03/202320/02/202319/03/202331/03/2023           1.250
Period206/03/202320/02/202319/03/202331/03/2023           1.100
Period207/03/202320/02/202319/03/202331/03/2023           1.200
Period208/03/202320/02/202319/03/202331/03/2023           1.250
Period209/03/202320/02/202319/03/202331/03/2023           1.100
Period210/03/202320/02/202319/03/202331/03/2023           1.200
Period211/03/202320/02/202319/03/202331/03/2023           1.250
Period212/03/202320/02/202319/03/202331/03/2023           1.100
Period213/03/202320/02/202319/03/202331/03/2023           1.200
Period214/03/202320/02/202319/03/202331/03/2023           1.250
Period215/03/202320/02/202319/03/202331/03/2023           1.100
Period216/03/202320/02/202319/03/202331/03/2023           1.250
Period217/03/202320/02/202319/03/202331/03/2023           1.100
Period218/03/202320/02/202319/03/202331/03/2023           1.200
Period219/03/202320/02/202319/03/202331/03/2023           1.250
Period320/03/202320/03/202319/04/202331/03/2023           1.100
Period321/03/202320/03/202319/04/202331/03/2023           1.250
Period322/03/202320/03/202319/04/202331/03/2023           1.100
Period323/03/202320/03/202319/04/202331/03/2023           1.200
Period324/03/202320/03/202319/04/202331/03/2023           1.250
Period325/03/202320/03/202319/04/202331/03/2023           1.100
Period326/03/202320/03/202319/04/202331/03/2023           1.200
Period327/03/202320/03/202319/04/202331/03/2023           1.250
Period328/03/202320/03/202319/04/202331/03/2023           1.100
Period329/03/202320/03/202319/04/202331/03/2023           1.200
Period330/03/202320/03/202319/04/202331/03/2023           1.250
Period331/03/202320/03/202319/04/202331/03/2023           1.100
1 REPLY 1
lbendlin
Super User
Super User

lbendlin_0-1703537991369.png

see attached

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.