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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Skip 0 values before making the calculated dimension

Hello,

I  have the following calculated dimension:

=aggr(if(rank(sum(sales),4)<0.1*count(total distinct customer), '0-10%',

if(rank(sum(sales),4)<0.2*count(total distinct customer), '10-20%',

if(rank(sum(sales),4)<0.3*count(total distinct customer), '20-30%',

if(rank(sum(sales),4)<0.4*count(total distinct customer), '30-40%',

if(rank(sum(sales),4)<0.5*count(total distinct customer), '40-50%',

if(rank(sum(sales),4)<0.6*count(total distinct customer), '50-60%',

if(rank(sum(sales),4)<0.7*count(total distinct customer), '60-70%',

if(rank(sum(sales),4)<0.8*count(total distinct customer), '70-80%',

if(rank(sum(sales),4)<0.9*count(total distinct customer), '80-90%'

, '90-100%'))))))))),customer).

I have Rows with 0 value, however i need them for the qwd.

¿it is posible to eliminate the values with sum 0?

14 Replies
Anonymous
Not applicable
Author

Hello,

on the excel ist shows the data what i would like to have.

Thank you

Anonymous
Not applicable
Author

Hello, doing your dimension expression it gives me a lot of classes.

could it be done so i have from 0-10%, 10 to 20% and so on?

Not applicable
Author

try:

=aggr(

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.1*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '0-10%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.2*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '10-20%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.3*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '20-30%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.4*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '30-40%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.5*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '40-50%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.6*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '50-60%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.7*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '60-70%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.8*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '70-80%',

    if(rank(sum({<customer-={"=sum(sales)=0"}>}sales),4)<0.9*count({<customer-={"=sum(sales)=0"}>}total distinct customer), '80-90%'

    ,'90-100%')))))))))

,customer

)

Anonymous
Not applicable
Author

Thank you xmg it worked!!!

thank you to all

Not applicable
Author

All right,so please mark it as corrent answer,thanks.