Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
lest assume i have table like this:
Tab1:
Client,
Type,
Date,
Val
And chart like this:
Dimensions:
Clients
Expression:
sum(Val)
This expression displays correct data only in Client dimension, so only selections by field Client is acceptable in order to use data from this chart. But in my case user may want to use selections on other filds. How can i disable all selections exept may be one (by Client) for this experssion?
I tried this:
1.
sum({1} Val)
But in this case all Clients in chart displayd(like no selection at Client)
2.
sum({1<Client = Client>} Val)
Same result as above.
3.
sum(sum({1<Client = {$(=Client)}>} Val)
This expression gives me right result from 1 Client in selection, if current selection contains 2 or more clients it displays 0.
4.
sum({$<Type =, Date =>} Val)
This one will work correctly. But in my data model i have 20+ fields in 10+ tables. Listing in this expression all of them... and what if i add some more, adding them in this expression every time...
May be i need other approach? Any ideas?
Thanx in advance.
Try something like this, where FieldName is the field you want to keep the selection for:
sum( {1<FieldName= P({$} FieldName) >} Val )
Try something like this, where FieldName is the field you want to keep the selection for:
sum( {1<FieldName= P({$} FieldName) >} Val )
Worked like a charm. Many thx)