Forum Discussion
SK87
4 years agoHelper III
Trailing 12 months bar chart based on slicer
Hi All I need to create a bar chart where I have trailing 12 months bars along with counts of categories of top 3+1(other). 1. I have created a calendar table and another column for End of month to...
SK87
4 years agoHelper III
1. Many to one actie relationship Data[SELECT MONTH] - Calendartable[DATE]
2. Many to one Inactive relationship Calendartable[Date] - Previous persiod[selectmonth]
Previous period is copy of calendar table
tamerj1
4 years agoCommunity Champion
Please try
=
VAR Smonth =
MAX ( 'calendartable'[StartofMonth] )
VAR Smonth1 =
MAX ( 'calendartable'[EO Month] )
RETURN
CALCULATE (
COUNT ( 'Data'[Categories] ),
'Data'[End Date] >= Smonth,
'Data'[Start Date] <= Smonth1,
CROSSFILTER ( Data[SELECT MONTH], Calendartable[DATE], NONE )
)