Hi, I need to count the [ISSUES] field based on my selected date. Essentially I have a bar chart with quarterly # of issues. I only want to add KPI to show # of ISSUES in latest quarter. say, 3 ISSUES in 2018-Q4, 8 ISSUES in 2018-Q3 and so on. However, when I use following expression, the figures look odd to me (ie, when i only selected year 2017 in filter pane, it shows 10) . Can anyone please advise? Thanks
ISSUES Date
3 2018-Q4
8 2018-Q3
13 2018-Q2
7 2018-Q1
7 2017-Q4
Count({$<[Date.autoCalendar.Quarter]={">=$(=date(max(Date.autoCalendar.Quarter)))"},[Date.autoCalendar.Year]={">=$(=date(max(Date.autoCalendar.Year)))"}>}ISSUES)
If the latest quarter is the previous quarter:
Count({$<[Date.autoCalendar.QuartersAgo]={1}>}ISSUES)
I finally created two additional fields based on Date, "ISSUES_QUARTER" and "ISSUES_YEAR", then use following expression to solve the problem
Count({$<ISSUES_QUARTER={"$(=Ceil(Month(max(Date))/3))"},ISSUES_YEAR={"$(=Year(max(Date)))"}>}ISSUES)