Forum Discussion
Stacked Bar Chart
- 9 years ago
You'll need to create a measure that will be called something like [Count of Status prev year]
The pattern should be something like :
Count of Status Prev Year = CALCULATE( COUNTROWS('<yourTable>'), PARALLELPERIOD('Dates'[Date],-12,MONTH) )This assumes you have a related date table called 'Dates' with a column called date.
- 9 years ago
Hi redwins,
According to your description above, you should be able to use the formula below to create the measure for "Count of Status Prev Year", then show it with "Count of Status" in the Value field of a Clustered column chart, and apply a visual level filter to limit the date to only 2017 for the chart.:smileyhappy:
Count of Status Prev Year = VAR currentYear = YEAR ( MAX ( Table1[creation date] ) ) VAR currentMonth = MONTH ( MAX ( Table1[creation date] ) ) RETURN CALCULATE ( COUNTROWS ( Table1 ), FILTER ( ALL ( Table1 ), Table1[creation year] = currentYear - 1 && Table1[creation month] = currentMonth ) )Note: replace "Table1" with your table name in the formula above.
Regards
You'll need to create a measure that will be called something like [Count of Status prev year]
The pattern should be something like :
Count of Status Prev Year = CALCULATE(
COUNTROWS('<yourTable>'),
PARALLELPERIOD('Dates'[Date],-12,MONTH)
)This assumes you have a related date table called 'Dates' with a column called date.
- redwins9 years agoNew Member
Hello Phil, thanks, I'll test it out.
- Rob