Forum Discussion
wlknsnBI
6 years agoHelper II
Months 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.
amitchandak
6 years agoSuper User
wlknsnBI ,
Refer to file for the solution you are looking for. You just need to take care how you want to datediff. I included first and last date
Bit different but also on similar line
https://www.dropbox.com/s/5wo5jhzl488zy69/Minute_between%20Hours.pbix?dl=0