Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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?
I assume you want a record based comparison, try
=COUNT({1<week_ship = {"=week_ship=week_ship_2"}>} orders)
thanks but it doesn't work ... I mean if I select week_ship_2 I get a result ... but it's completely different from the result that I want from the first formula.
BTW : week_ship adn week_ship_2 are two fields
Hi tode,
You can try dis,
COUNT({$<week_ship = {'week_ship=week_ship_2'}>} orders)
Ok, so week_ship and week_ship_2 are not two columns in the same table?
How are they related? What do you want to achieve in a "big picture"?
No they are not two columns of the same table ... they come from two different tables but the two tables are linked through orders (anyway the number of the order)
And you can have multiple week_ship and week_ship_2 per order?
If yes, how to handle these cases?
Could you give some sample lines of data together with your expected outcome?
These are the two fields.
Anyway ... are there others way to convert COUNT(IF(week_ship=week_ship_2, orders))
in a set analysis ?
I was more thinking of an example demonstrating your table / field relations like
LOAD * INLINE [
Order, week_ship
1, 1
1, 2
2, 3
3, 4
];
LOAD * INLINE [
Order, week_ship_2
1, 2
2, 3
3, 3
];
And then an example of how you use your expression (in which context, chart object - any information that might help).