Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated an average by month where the dimension is hour

Hello to all comunity members,

Having the table below:

Capture.PNG

I want in a chart expression calculate BY hour the average BY month of Sales/Number of stores. Can any help me to formulate the right expression?

Best regards

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try avg(aggr(sum(Sales)/max([Number of Stores]),Month,Hour))


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a straight table object and use Month as dimension and avg([Number of stores]) avg(Sales) as expressions


talk is cheap, supply exceeds demand
Not applicable
Author

Even if I want to display values by hour not by month?

Not applicable
Author

What I did is that I created a chart, I then choose Hour as a dimension and put the following expression:

Aggr(Avg(Sales/Number Of Stores),M)

But I had no displayed data

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Please post the result table you expect.


talk is cheap, supply exceeds demand
Not applicable
Author

11.PNG

I gave an example of how I want to calculated the average that I want to calculate. Maybe I didn't explain well what I wanted, sory for that

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try avg(aggr(sum(Sales)/max([Number of Stores]),Month,Hour))


talk is cheap, supply exceeds demand
Not applicable
Author

Accurate answer as always, many thanks Gysbert.

Best regards,

Yasser.