Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Ive got a couple of charts that uses the same selections in their set analysis and I thought Id use a variable instead so I can change them all from one place.
ex.
count({<customer={'1001','1002','1003'}, type -= {'10','20'} >} orders)
What Id like is to replace the whole line and in some cases add more selection so it might look something like this;
Count({<$(vCustomerTypeSelection), artnr={'2423','4222'} >} orders)
Is it possible, or do I have to settle with two variables contaning just the "numbers" (in the above case)?
Thanks in advance!
/Tomas
I think this should be possible:
Count({<$(vCustomerTypeSelection), artnr={'2423','4222'} >} orders)
The only issue would be the syntax editor won't understand the syntax, but that should not stop you from getting the same result as this
Count({<customer={'1001','1002','1003'}, artnr={'2423','4222'}>} orders)
I think this should be possible:
Count({<$(vCustomerTypeSelection), artnr={'2423','4222'} >} orders)
The only issue would be the syntax editor won't understand the syntax, but that should not stop you from getting the same result as this
Count({<customer={'1001','1002','1003'}, artnr={'2423','4222'}>} orders)
It is possible and I did used in various applications..
Count({<$(vCustomerTypeSelection), artnr={'2423','4222'} >} orders)
I havnt used varables much, how would the set/let look like for it to work?
Ive now also having trouble using dates...
In load-script I have this;
Let vCurrYear = Year(now());
Let vCurrMonth = month(now());
Let vCurrWeek = week(now());
Let vCurrDay = date(now());
and in a simple text-object I tested with this; (and a couple of other variants)
count({1<%Date={'${=$(vCurrDay)}'}>}Transnr)
This just shows a '0' (where I know it should display '11')
Year, month and week works as they should, like this;
count({1<År={$(vCurrYear)}>}Transnr)
%Date is a key to a calendar and its content is like '2016-07-29' (the same as 'date(now())' is)
Ive also tried;
count({1<%Date={=date(now())} >}Transnr)
but it generates the error "Error in the set modifier ad hoc element list: ',' or ')' expected"
Any clues?
Would you be able to share a sample where you might be testing all this out?
>>I havnt used varables much, how would the set/let look like for it to work?
Set vCustomerTypeSelection = customer={'1001','1002','1003'};
Hi Tomas, about the dates...
count({1<%Date={'${=$(vCurrDay)}'}>}Transnr) --> try:
count({1<%Date={'$(vCurrDay)'}>}Transnr)
count({1<%Date={=date(now())} >}Transnr) --> try:
count({1<%Date={'$(=date(now()))'}>}Transnr)
Tried but didnt work...
Seems to be working: