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
Not applicable
Author

You got my situation with your example. But really I cannot get why all the time the result is 0 with the set analysis while I have a different result with the standard formula with if.

I thouth to use the function P() ... I got a result but it's different from my original formula

swuehl
MVP
MVP

Have you checked my attachment? There I use both expressions with same result.

Could you maybe post an example that demonstrates your problem or modify mine?

Not applicable
Author

I saw you attachament ... and really is fine2.JPG

My formula is: 23.JPG

And is very similar to yours but I get just 0 as results

(I posted Images so nobody can seek this formulas on google)

I cannot understand way.

I tried with P() as well, I got a result but it's not the desired one.

Not applicable
Author

AND IF IT HELPS i AM USING THIS EXPRESSION IN A GAUGE CHART

swuehl
MVP
MVP

Not sure where your arrows in your first image point to, definitely not to SETTIMANA_SPEDIZIONE or ...SETTIMANA_DELIVERY.

But anyway, you are using single quotes in your element_set, instead of double quotes.

Use ....={"=week_ship=week_ship_2"}

Not applicable
Author

Believe me ...the two weeks column are located in those two tables.

I tried with and not the " or ' without any result. I am sure that your solution works fine ....but I cannot really get why I am unable to the same in the gauge chart of my document.

swuehl
MVP
MVP

So the expression works in your app in a straight table / text object?

You only have problems using it in a gauge chart? Well, I can use the expression in a gauge chart, so you must do it in a different way / setting. But you are always a bit short in giving more informations which makes it quite hard to help you. Could you please describe your setting a bit closer (dimensions / expressions etc.).

Again, providing a small sample app would really help me to help you.

Not applicable
Author

This is an example also here my result is 0

Not applicable
Author

It doesn't matter if I use "

gandalfgray
Specialist II
Specialist II

Try:

=COUNT({$<week1 = P(week2)>} DISTINCT  week1)

if you want to count "matching weeks"

/GandalfGray