Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to convert this espression in a set analysis expression

Here you are the normal expression:

COUNT(IF(week_ship=week_ship_2, orders))

I tried with this one ... but it doesn't work:

COUNT({1<week_ship={$(=ONLY(week_ship_2))}>} orders)

Anybody ?

Thanks in advance

26 Replies
swuehl
MVP
MVP

You missed an equal sign, and I think we need to use or_num as field in the set expression:

=COUNT({$<ord_num = {"=week1=week2"}>} ord_num)

Not applicable
Author

Thank you Gandalf but is not what I am seeking ....

I have to make as for the first expression count if week1=week2 but with set analysis

Not applicable
Author

Thank you swuehl .... now it works ...but I have big problem on it....

The result has to stay "stable" though there are selections on. I thought to change the $ with 1 but it doesn't work.

With this formula on =COUNT({1<ord_num = {"=week1=week2"}>} ord_num) if there are selections it doesn't work ....

1 it should work but I cannot really get why now not ... it doesn't

swuehl
MVP
MVP

This should work in your setting with single week# per order_num in both tables:

=COUNT({1<ord_num = {"=only({1}week1)=only({1}week2)"}>} ord_num)

Not sure if the set expression is much better performing than your original expression ( count(if(..)) ) in this case, do you see an improvement?

Not applicable
Author

swuehl ...really If you have to visit my country (Italy)... I will offer you a nice cofee or a glass of wine ...

Thanks a lot

swuehl
MVP
MVP

Be careful with your offers, I visit Italy from time to time...

If you find any of my answers helpful or correct, you can also mark it accordingly, this helps others in quickly grasp the relevant parts of the discussion.

Anonymous
Not applicable
Author

Tea and biscuits if you come to Australia!!!