Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm very new to Qlik sense and hoping for some help having trawled the advice available and not quite found the solution. I have arrival data that is summarised into a table as below by arrival hour:
Date | Hour 0 | Hour 1 | Hour 2 | Hour 3 | etc |
---|---|---|---|---|---|
01/07 | 4 | 5 | 12 | 9 | |
02/07 | 3 | 9 | 13 | 10 | |
03/07 | 5 | ||||
04/07 | |||||
etc. | |||||
ie 4 people arrived between midnight and 1am on the 01/07.
I want to be able to provide a summary table below this that shows the 80th percentile of arrivals over the period for each hour (ie for hour 0 the 80th percentile of {4,3,5.....}. I'm resistant to creating a summarised table in the model as my table above can be changed using a variety of filters and I need the calculated figures to adjust in relation to these filters.
I think it should be possible using the AGGR and Fractile functions but it doesn't seem to be calculating correctly - so far I have a table with column dimensions of my hours and a calculated measure as follows:
= Fractile( AGGR(SUM([act_type_row_counter]),Hour,Date),0.8)
I think the issue is with the AGGR function as if I try a simple max function rather than the fractile it doesn't give me the right anserws. I think it might be to do with the 2 dimensions in the AGGR function but I'm struggling to see how to fix it.
Hoping someone will be able to offer some advice.
Many thanks
What is that you are getting and what is that you are hoping to get?
I have a table Hour 0, Hour 1, Hour2 ... and underneath I'm getting answers but they are clearly wrong (too high) and the last couple of hours show blanks. It occurred to me last night that I may need to create effectively a concatenated field that combines date and Hour to use as my dimension in the aggregate - I don't feel like I'm specifying clearly enough what I want it to aggregate over so it's making assumptions I don't want it to. Does that sounds sensible?
Resolved. Creating a concatenated field that combined the 2 dimensions in the aggregate to 1 ie
Fractile( AGGR(SUM([act_type_row_counter]),DateHour),0.8) produced correct calculations.