Forum Discussion
domiowa
8 years agoFrequent Visitor
Sum by month
Hi everyone, I have a problem to do something very simple on excel but so hard on power BI I have a project table with my project Name, starting date, excepted ending date and ending date So I'd l...
v-jiascu-msft
8 years agoMicrosoft Employee
Hi domiowa,
Try out these two measues please. You also can check it out in this file.
Measure 1 =
SUMX (
SUMMARIZE (
'Project',
'Project'[Project],
Project[Starting Date],
Project[EndingDate],
"Months", DATEDIFF ( Project[Starting Date], Project[EndingDate], MONTH )
),
IF ( [Months] = 1, 1, BLANK () )
)Measure 2 =
CALCULATE (
COUNTROWS ( 'Project' ),
FILTER (
'Project',
MONTH ( 'Project'[EndingDate] ) - MONTH ( Project[Starting Date] )
= 1
)
)
Best Regards,
Dale