Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am working on a Qlik Sense project and I am stuck in fixing one issue for 3 days. The following is the description of the issue:
Brand | Customer | Sales | Top 25% Customer |
A | C1 | 800 | C1 |
A | C2 | 700 | C2 |
A | C3 | 600 | - |
A | C4 | 500 | - |
A | C5 | 400 | - |
A | C6 | 300 | - |
A | C7 | 200 | - |
A | C8 | 100 | - |
I am using the variable to fetch the Top 25% Customer : aggr(if(rank($(vTotal_Sales))<=0.25* count (distinct Customer)),Customer),Customer).
This variable works perfectly and I am sure the data model is correct. However, when I am pulling one more calculated Dimension for Brand_Top_Calculation: (if len($(vTotal_Sales))>0, Brand, null()), some of the Top 25% Customer have the corresponding Brand_Top_Calulation; but some of the other 25% customer do not have.
Can anyone hep me out or provide any thoughts you have for this issue?
Thanks so much in advance!
Regards,
Ying
Can you share a sample or screenshot to show what the issue is with and without the additional calculated dimension?
Hi Sunny,
Thanks for the reply!
Sorry there is a typo in my original post. the Brand_Top_Calculation is: if(len($(vTop_Customers))>0, Brand,null()). vTop_Customers is the variable I am using to get the top 25% customers listed in the above post.
Here is the sample without the Brand_Top_Calculation
Brand | Customer | Sales | Top 25% Customer |
A | C1 | 800 | C1 |
A | C2 | 700 | C2 |
A | C3 | 600 | - |
A | C4 | 500 | - |
A | C5 | 400 | - |
A | C6 | 300 | - |
A | C7 | 200 | - |
A | C8 | 100 | - |
Here is the sample with the Brand_Top_Calculation:
Brand | Customer | Sales | Top 25% Customer | Brand_Top_Calculation |
A | C1 | 800 | C1 | A |
A | C2 | 700 | C2 | - |
A | C3 | 600 | - | - |
A | C4 | 500 | - | - |
A | C5 | 400 | - | - |
A | C6 | 300 | - | - |
A | C7 | 200 | - | - |
A | C8 | 100 | - | - |
Basically, I want to show A in Brand_Top_Calculation in the first two row as C1 and C2 are the top 25% customers in this data set, but one of them is correctly populated, but the other gives me the null value.
I think the issue might lie in the calculation of top 25% customers, but still cannot figure out the exact issue.
Thank you so much for the help!
Regards,
Ying