1

A simple, but yet frequent statistics is a histogram of derived entity, and if I understand the official QlikSense documentation right that seems not working out of the box:

You cannot use a master dimension that was created using the expression editor, even if the resulting field is numeric. The dimension cannot be based on an aggregation function.

Assume I have some mockup-data of basic user data looking like this:

id  first_name  last_name   gender  date_added  nickname
1   Marthe      Salzburg    Female  2018-03-27  msalzburg0
2   Larine      Camm        Female  2018-05-13  lcamm1
3   Leanor      MacIan              2018-05-13  lmacian2
4   Shawnee     Baudain     Female  2018-01-08  sbaudain3
5   Mable       Sitlinton   Female  2018-03-27  msitlinton4
6   Jilleen     Wadesworth  Female  2018-04-12  jwadesworth5
7   Mace        Lube        Male    2018-11-18  mlube6

Plotting how many user registered each day is easy: Add a new bar plot to your QlikView sheet, choose date_added as dimension and Count([date_added.autoCalendar.Date]) as measure, et volià: enter image description here

The next logical question to ask is: On how many days have been x users added? The answer I expect from the mock data above would be something like:

  added_per_day occurences
  2             2
  1             3
  0             309  # (number of days between 2018-01-08 and 2018-11-18) - 5

My question: How do I do generate such a histogram with QlikSense?

As mentioned in answer to a different question, my challenge is that the active QlikSense community seems to be rather small, that why I am asking here. I am new to the software, I am rather used to the command-line approach.

B--rian
  • 5,578
  • 10
  • 38
  • 89
  • 1
    what is the logic behind "added_per_day" and "occurences"? it is not clear – EldadT Nov 29 '18 at 08:52
  • It is a histogram showing how many days with 2, 1 or 0 users are added per day. – B--rian Nov 29 '18 at 08:57
  • 1
    have you looked at the aggr chart function? – BRM Nov 29 '18 at 18:36
  • I looked at https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/aggr.htm May you give me a concrete example for my problem, please? – B--rian Nov 30 '18 at 05:12

1 Answers1

1

So you need something like this in your load script:

Load date_added, count(date_added) as Added_Per_Date
resident Data
group by date_added;

to that you will need to add all the dates that are not used...

and then in your chart use Added_Per_Date as dimension and count(Added_Per_Date) as expression

EldadT
  • 912
  • 7
  • 21
  • I will try to learn about load scripts as described https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Load.htm May you please elaborate a bit on what your load-script does and how to expand the data-series (within QlikSense)? – B--rian Nov 30 '18 at 05:17
  • 1
    There many tutorials online, here is one. https://m.youtube.com/watch?v=Pl9QKCifUTg – EldadT Nov 30 '18 at 11:55