Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a variable in my script:
Let vValue = 'Avg((Points-Target)/Difference)';
What I would like to do, is use this in an expression with set analysis. For example:
=ONLY({<Type={'A'}>} $(vValue))
But this just gives me a '-' null value.
If I just put =$(vValue) and then select 'A' from a filter for Type, it works fine. So why can't I do this within my expression?
I need to keep my 'A' dimension within the expression, as I plan on using several expressions within the chart, with the appropriate dimension coming from a different field each time.
Any help appreciated.
Thanks,
Jess
That is exactly it!
Thank you so much Marcus, really appreciate your help with this!
Best wishes,
Jess
How would the code look if you want to use two dimensions in this set analysis?
Hi Laura,
I added another dimension as follows:
=ONLY({<Type={'A'}, Dim2={'X'}>} aggr($(vValue), Type,Dim2))
With Dim2 being my second dimension and that worked just fine.
Thanks a lot for your fast respond, it works!