Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to create a bar chart of closed cases by month. I only want to display 3 months of data. My dimension is "Month Year Closed" my expression is "Count(Cases_Closed)"
How do i limit to last 3 months? and how do group the each months into one bar?
Thanks
Hi Ann,
So if your MonthYear field has MMM YYYY format, you can try the following:
Expression:
=Count({<[Month Year Closed]={">=$(=MonthName(AddMonths(Max([Month Year Closed]),-2))) <=$(=MonthName(Max([Month Year Closed])))"}>}Cases_Closed)
Now If you want to group the months in one bar:
Go to Object Properties -> Style Tab and then under Subtype section, Select Stacked.
Hope that helps,
Carlos M
see this post
subtype is grayed out
Oh that's right! It is gray out because you only have one expression! So that option works with 2 or more expressions.
If you need to do Stacked bar, update and add the expressions to be:
1st
=Count({<[Month Year Closed]={"=$(=MonthName(AddMonths(Max([Month Year Closed]),-2)))"}>}Cases_Closed)
2nd
=Count({<[Month Year Closed]={"=$(=MonthName(AddMonths(Max([Month Year Closed]),-1)))"}>}Cases_Closed)
3rd
=Count({<[Month Year Closed]={"=$(=MonthName(Max([Month Year Closed])))"}>}Cases_Closed)
Thanks,
Carlos M