Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
i have a straight table with 3 dimensions (product ID is a calc dim and 2 others) and some expressions.
one of the dimensions is the City name.
I would like to limit the number of product IDs that are from the same city.
how can I do this in a straight table?
thanks!
Hi, I really need your help in this
for example, this is what i have today:
productID | City name | sort odrder |
5 | NYC | 1 |
6 | NYC | 2 |
2 | NYC | 3 |
1 | Paris | 4 |
7 | Paris | 5 |
4 | Paris | 6 |
3 | NYC | 7 |
i want to have this:
productID | city name | sort order |
5 | NYC | 1 |
6 | NYC | 2 |
1 | Paris | 4 |
7 | Paris | 5 |
thank you!
Yes its possible. In your straight table add City Name and Sort order as dimensions, then in your expression put in :
=sum(if(productID >= 4, productID))
This will give you required output. Just rearrange the cols to suit by dragging and dropping.
Hi,
are You sure about ProductID Paris (7,4 or 1,7) ?
Antonio agreed, think there is a mistake in the OP's required table. Output will be :
Product ID | City name | Sort Order |
5 | NYC | 1 |
6 | NYC | 2 |
4 | Paris | 6 |
7 | Paris | 5 |
In "dimension limit" tab -> "Limits" , you can set different criteria, for more you can set a variable which in the expression in order to limit the display numbers. To displays for specific id, you can use a "if" statement in "expression" tab!
Hi,
the table above is just an example, the product ID can be any value.. my intention is to have only 2 values of every city name (with the highest sorting value).
thank you!
sorry, you are correct.
fixed
Yes you could use if greater or equal to Max no -1. That will give you output you need.
You need Calculated Dimension like
=Aggr(If(Rank(-[sort odrder]) <= 2,productID),[City name],productID)
Check 'Suppress when value is null'
Regards,
Antonio