Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Getting Min value from Last 4 Quarter graph

Hi All, I need help here to solve this issue.

 

Let me explain the requirement first:

Getting the difference between min value and max value based on filtered graph. Which in my case last 4 quarter.

 

This graph is shown based on this formula:

 
Last 4 Quarters Avg Fac ID =
CALCULATE(([Sum CountD Facility ID]/[CountD YearMonth 2]),
FILTER( ALL(DateSelector[YearMonth]),
DATEDIFF(DATE(YEAR(MAX(DateSelector[YearMonth])),MONTH(MAX(DateSelector[YearMonth])),DAY(DateSelector[YearMonth])), DateSelector[YearMonth] ,QUARTER) <=0 && DATEDIFF(DATE(YEAR(MAX(DateSelector[YearMonth])),MONTH(MAX(DateSelector[YearMonth])),DAY(DateSelector[YearMonth])), DateSelector[YearMonth] ,QUARTER) >= -3 ))

 

For example when i filter sept 18 then the graph will show last four quarter from Sept-18(Like the picture above)

 

The issue here is I need to do calculation to get the min value of the last 4 quarter which is Q4-2017 value as per the picture. And my max value is Q3-2018. This should always change prior to date filter selected.

 

The calculation value will be shown in card.

 

Thank you in advance! :)

 

 

2 Replies