Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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.QoQ.PNG

 

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! 🙂

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

This looks like a measure totals problem. Very common. See this post about it here:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

In your case, if you change bar chart visual to table visual, you will find the table visual is like this

Quarter  Last 4 Quarters Avg Fac ID
Q4-17 1658
Q1-18 1667
Q2-18 1646
Q3-18 1621
Total

***

 

Then you use MINX() or MAXX() instead of SUMX() in above post to create a measure to get the min/max value and then drag 

the measure into card visual.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

This looks like a measure totals problem. Very common. See this post about it here:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

In your case, if you change bar chart visual to table visual, you will find the table visual is like this

Quarter  Last 4 Quarters Avg Fac ID
Q4-17 1658
Q1-18 1667
Q2-18 1646
Q3-18 1621
Total

***

 

Then you use MINX() or MAXX() instead of SUMX() in above post to create a measure to get the min/max value and then drag 

the measure into card visual.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks! It works with the MINX and MAXX

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors