Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gautik92
Specialist III
Specialist III

Avg Sales Quarter and month

How to calculate avg Sales for Quarter and MonthUntitled.png

2 Replies
danieloberbilli
Specialist II
Specialist II

If you would like the results per Quarter (Q1, Q2...) or per Month (Jan, Feb,...) - this is not possible with a gauge object as you cannot use dimensions. Use a bar or line chart instead...or a gauge chart for each value of your dimension (one gauge for Q1, one for Q2...)

MK_QSL
MVP
MVP

Considering that you already have master calendar or quarter field in your script....

if not, use below expression to create a Quarter Field

'Q' & CEIL(Month(Date(InvoiceDate))/3) as Quarter

Now u can get the average sales per quarter and per month for year 2014 as below in GaugeChart

=AVG(Aggr(SUM({<Year= {'$(=Year(Today()))'}>}Sales),Quarter))

=AVG(Aggr(SUM({<Year = {'$(=Year(Today()))'}>}Sales),Month))

Make sure to change the Min and Max of Gauge Chart from Presentation layer with

Min

0

max

SUM(Sales0