Forum Discussion
Anonymous
4 years agoNot applicable
Visualize partial months in bar chart
I have sales data that goes through December 21st 2021 I also have last year's sales data through December 21st 2020. Note that I blanked out all data past todays (12/21) date as I want to compare a...
v-jingzhang
4 years agoCommunity Support
Hi Anonymous
Try these measures
Sales TY = CALCULATE(SUM('Table'[Sales]),Dates[Year]=YEAR(TODAY()))Sales LY =
VAR _month = SELECTEDVALUE(Dates[Month])
RETURN
CALCULATE(SUM('Table'[Sales]),ALL(Dates),Dates[Year]=YEAR(TODAY())-1,Dates[Month]=_month,Dates[Date]<=EDATE(TODAY(),-12))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.