Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis in If expression

Hi guys,

I have this expression

count(distinct {$<id = P({1<bonus={"*"}>})>} id)

and i want to use it in a dimension like this

If (count(distinct {$<id = E({1<bonus={"*"}>})>} id) <> 0, Number)

But it does not work and gives error "Error in calculated dimension".


What I want to do is....if count is not equal to 0 then only show a particular "Number " on the dimension...

Any help would be appreciated.

Regards,

Saurabh




1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=aggr( If (count(distinct {$<id = E({1<bonus={"*"}>})>} id) <> 0, Number), Number)

View solution in original post

4 Replies
mambi
Creator III
Creator III

Why you don't just use : if (count( {1} distinct bonus)>0, Number)

Not applicable
Author

Hello,

may you attach application with sample data?

regards

Darek

Not applicable
Author

It still gives same error

swuehl
MVP
MVP

Try

=aggr( If (count(distinct {$<id = E({1<bonus={"*"}>})>} id) <> 0, Number), Number)