Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I have the following scenario in Qlik Sense:
I want to:
I could do something by using valuelist, but valuelist does not respond to selecions. I need a responsive bar chart per quartile.
Is that possible to do?
Thank you in advance.
Rubens
Ignore selections within Fractile
Aggr(
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.25), 'Quartile 1',
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.50), 'Quartile 2',
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.75), 'Quartile 3', 'Quartile 4'))), Customer_Code)
or this
Aggr(
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.25), 'Quartile 1',
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.50), 'Quartile 2',
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.75), 'Quartile 3', 'Quartile 4'))), Customer_Code)
What is the expression you use to calculate quartile? May be like this
Dimension
Aggr(YourExpression, Customers)
Expression
Count(DISTINCT Customers)
My expression is: E.g. 1st Quartile:
Count({< Access_Time = {"<=$(=Fractile(Access_Time , 0.25))"}>} Customer_Code)
I have two situation:
Is that possible to do?
Tks
I am not sure I follow... would you be able to share a sample?
Sure. I'll try to add here.
For example: Below I have the boxplot with my data:
My problem is I don't know if it's possible to have a calculated dimension that can represents the quartiles.
Tks.
You def. need a calculated dimension here.... not 100% sure, but try this
Dimension:
Aggr(
If(Access_Time <= Fractile(TOTAL Access_Time, 0.25), 'Quartile 1',
If(Access_Time <= Fractile(TOTAL Access_Time, 0.50), 'Quartile 2',
If(Access_Time <= Fractile(TOTAL Access_Time, 0.75), 'Quartile 3', 'Quartile 4'))), Customer_Code)
Expression
Count(DISTINCT Customer_Code)
Hi Sunny,
Your code really worked. I Only changed the Expression field. In instead of using Customer_Code, I'm using Max(Access_Time), and now I can have a boxplot quartile representation as follows:
However, When I click on any of those quartiles, the bar chart will recalculate new quartiles for the resulting set. For instance: If i click on quartile 1, the barchart will recalculate the result set and mount the 4 quartiles for it:
My question is:
I do appreciate your help with this!
Rubens
Ignore selections within Fractile
Aggr(
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.25), 'Quartile 1',
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.50), 'Quartile 2',
If(Access_Time <= Fractile({<Customer_Code>}TOTAL Access_Time, 0.75), 'Quartile 3', 'Quartile 4'))), Customer_Code)
or this
Aggr(
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.25), 'Quartile 1',
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.50), 'Quartile 2',
If(Access_Time <= Fractile({<1>}TOTAL Access_Time, 0.75), 'Quartile 3', 'Quartile 4'))), Customer_Code)
Thank you Sunny! The first option worked as expected!!!
Just a curiosity, what does the formula parts below do?
Fractile({<Customer_Code>}TOTAL Access_Time, 0.25),
Tks again!