Forum Discussion
wlknsnBI
Helper II
6 years agoMonths between two dates (+decimals)
Hi, I'm looking to get the months between two dates, plotted onto table like below (using calendar table probably). What would be the measure to make that happen to include partial months (lookin...
- 6 years ago
Hi wlknsnBI
Please kindly check below results:
Table = ADDCOLUMNS(CALENDAR(DATE(2019,01,01),DATE(2020,12,31)),"YearM",YEAR([Date])*100+MONTH([Date]))Measure = var y = MAX('Table'[YearM]) return DIVIDE(COUNTROWS('Table'),CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[YearM] = y)))Pbix attached.
v-diye-msft
Community Support
6 years agoHi wlknsnBI
Please kindly check below results:
Table = ADDCOLUMNS(CALENDAR(DATE(2019,01,01),DATE(2020,12,31)),"YearM",YEAR([Date])*100+MONTH([Date]))Measure = var y = MAX('Table'[YearM])
return
DIVIDE(COUNTROWS('Table'),CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[YearM] = y)))
Pbix attached.