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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Minus 1 day in edate measure

Hi all,

I found for my case the half way to complete solution, but now now I'm stuck.

I have below information, but on the end I need a solution, that the edate is minus 1 day.
This is my information Visual, it contain follow measures:

MaPBIAch2010_0-1695288776160.png

Runtime mth = (sum(Activities[Project_Runtime])*12)
 
SOP sdate = FIRSTDATE(Activities[SOP_Year])
 
SOP edate = IF((EDATE((MAX(Activities[SOP_Year])),[Runtime mth])) = Date(1900,12,31),"",(EDATE((MAX(Activities[SOP_Year])),[Runtime mth])))
 
The calculation by above measures look in the table correct.
But when I use below measure
 
Potential Sum per mth = SUMX(VALUES('Calendar'[YYYY-MM]), CALCULATE(SUMX(FILTER(Companies, Companies[SOP sdate] <= max('Calendar'[Date]) && Companies[SOP edate] >= MIN ('Calendar'[Date])), DIVIDE(Activities[Potential total SOP LC], DATEDIFF(Companies[SOP sdate], Companies[SOP edate],MONTH)))))
 
The Matrix visuel show the 5.000,00 to much in 2029 and the total is 365.000,00
MaPBIAch2010_1-1695289353016.png

I tried to subtract a day from the edate (-1 day), but can't get it to work.

Can someone help with me?

Thank u in advance!

KR

Maha

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi all,

I found for my case the half way to complete solution, but now now I'm stuck.

I have below information, but on the end I need a solution, that the edate is minus 1 day.
This is my information Visual, it contain follow measures:

MaPBIAch2010_0-1695361959432.png

 

Runtime mth = (sum(Activities[Project_Runtime])*12)
 
SOP sdate = FIRSTDATE(Activities[SOP_Year])
 
SOP edate = IF((EDATE((MAX(Activities[SOP_Year])),[Runtime mth])) = Date(1900,12,31),"",(EDATE((MAX(Activities[SOP_Year])),[Runtime mth])))
 
The calculation by above measures look in the table correct.
But when I use below measure
 
Potential Sum per mth = SUMX(VALUES('Calendar'[YYYY-MM]), CALCULATE(SUMX(FILTER(Companies, Companies[SOP sdate] <= max('Calendar'[Date]) && Companies[SOP edate] >= MIN ('Calendar'[Date])), DIVIDE(Activities[Potential total SOP LC], DATEDIFF(Companies[SOP sdate], Companies[SOP edate],MONTH)))))
 
The Matrix visuel show the 5.000,00 to much in 2029 and the total is 365.000,00
MaPBIAch2010_1-1695361959437.png

 

I tried to subtract a day from the edate (-1 day), but can't get it to work.

Can someone help with me?

Thank u in advance!

KR

Maha

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi all,

I found for my case the half way to complete solution, but now now I'm stuck.

I have below information, but on the end I need a solution, that the edate is minus 1 day.
This is my information Visual, it contain follow measures:

MaPBIAch2010_0-1695361959432.png

 

Runtime mth = (sum(Activities[Project_Runtime])*12)
 
SOP sdate = FIRSTDATE(Activities[SOP_Year])
 
SOP edate = IF((EDATE((MAX(Activities[SOP_Year])),[Runtime mth])) = Date(1900,12,31),"",(EDATE((MAX(Activities[SOP_Year])),[Runtime mth])))
 
The calculation by above measures look in the table correct.
But when I use below measure
 
Potential Sum per mth = SUMX(VALUES('Calendar'[YYYY-MM]), CALCULATE(SUMX(FILTER(Companies, Companies[SOP sdate] <= max('Calendar'[Date]) && Companies[SOP edate] >= MIN ('Calendar'[Date])), DIVIDE(Activities[Potential total SOP LC], DATEDIFF(Companies[SOP sdate], Companies[SOP edate],MONTH)))))
 
The Matrix visuel show the 5.000,00 to much in 2029 and the total is 365.000,00
MaPBIAch2010_1-1695361959437.png

 

I tried to subtract a day from the edate (-1 day), but can't get it to work.

Can someone help with me?

Thank u in advance!

KR

Maha

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.