Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I need some help to calculate avg of every quarter for 2019 and 2020. See picture below. The first graph is what I have now, but I need to be more like second graph - with avg value of every quarter. So mDate should be like avg of Q1 2009, Q2 2009 ... Q1 2020, Q2 2020 and so on.
The graph should lool like this but with only one expression and contain 2019 and 2020 (like graph above).
In the script I have added ceil(month(Date)/3) as Quarter, so I can get the quarters, but here it ends... how do I move on to fix it? I think It should be something with a avg(aggr... but im not sure.
My script looks like this:
Thans in advance!
Please feel free to move this topic to another location if this is wrong location.
Best regards,
Semiro
For me, It is purely settings, Can you dropdown and choose Circle and see? To custom the circle you can play around in Presentation tab.
Hi Anil and thanks for a quick reply.
I know about that setting, but Its not the solutions In this case. What I want is a line graph (like the first graph) with a avg of every quarter and not like I have now. January 2019, Feb 2019 ... January 2020, Feb 2020... I want it more like Q1 2009, Q2 2009 ... Q1 2020, Q2 2020 where Q1 2019 is avg of Jan, Feb and Mar 2019 and so on.
I can help you out that also, Will you able to offer QVW or QVF with some source? You need to dig into some script with Concat using Dual table and Fact table..
@Semiro I think you might need to use Quarter as your dimension and may be this as your expression
Count(Category)/3
Hi Sunny,
Thanks for the tip! I will try that.
Hi Sunny,
Im really close now to getting what I want, but there is still some problems.
I have also used one of you other scripts:
Year(Date#(mDate, 'MMMM YY')) & 'Q' & Ceil(Month(Date#(mDate, 'MMMM YY'))/3) as Quarter,
instead of
Ceil(month(Date)/3) as Quarter,
As you can see below, Im really cloes to my goal:
But I dont know why Im gettign just "Q" alone.
Some other people hade same problem and It was because some of the dates was null. Its not the problem in my case.
And one other thing:
When I mark 2019Q2, I only getting April and May.. why not June 2019?
But when Im using just Ceil(month(Date)/3) as Quarter, I getting correct dates:
Thanks in advance!
Best regards,
Semiro
I would have to believe there is something wrong in your data model regarding the link between the Quarter field and the actual values in there. I do see a Q value in the Quarter list box, that would seem to be incorrect by some form as well, so data model is where I would be looking at this point, you will need to attach qvw file if you want further help I believe, as folks are going to need to be able to dig into the data model and object and expressions at this point to try to figure out what is wrong.
Regards,
Brett
Hi Brett,
Quite new at Qlik but here is the qvw-file. Hope the file works fine.
BR,
Semiro