Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Problem in Expression !!

Hey,

I am having a dummy database where i am calculating insurance claimed by female.

I am using following expression but no data is being displayed. Please help

if([Maturity Year]<=2014,

Count({<Product = , [Customer Gender] = {"Female"}>}[Customer Name])/Count({<[Customer Gender]={"Female"}>}[Customer Name]))

Thanks

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

So write:

[Maturity]={"<=2014"}

REgards

KC

Best Regards,
KC

View solution in original post

5 Replies
sspe
Creator II
Creator II

Hi,

Have you tried to troubleshoot it "step-wise"? I'd suggest that you start with e.g. just the first COUNT.... to see if that works. If that shows you some numbers, then you can try adding the IF statement and so on. Then you'll find which part of the statement that fails.

/Steen

nikhilgarg
Specialist II
Specialist II
Author

HEy instead of above script i used this way:

Count({<Product = , [Customer Gender] = {"Female"} , [Maturity Year] ={2014}>}[Customer Name])/Count({<[Customer Gender]={"Female"}>}[Customer Name])

But i want to comapre for Maturity Year <=2014 But it gives me error when i use <=.

WHat to do ??

jyothish8807
Master II
Master II

So write:

[Maturity]={"<=2014"}

REgards

KC

Best Regards,
KC
Not applicable

Try this,


Count({<Product = , [Customer Gender] = {"Female"} ,[Maturity Year]={'<=2014'}>}[Customer Name])/Count({<[Customer Gender]={"Female"}>}[Customer Name])

PrashantSangle

Hi,

If this expression works for you

Count({<Product = , [Customer Gender] = {"Female"} , [Maturity Year] ={2014}>}[Customer Name])/Count({<[Customer Gender]={"Female"}>}[Customer Name])

then try for <= in set analysis

like

Count({<Product = , [Customer Gender] = {"Female"} , [Maturity Year] ={"<=2014"}>}[Customer Name])/Count({<[Customer Gender]={"Female"}>}[Customer Name])

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂