Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a calculated dimension that produces string names for the dimension. Its a fairly complicated calculation based on the data grouping various levels of data into the dimension called 'Professional', a different grouping into 'Consumer' and another one to group into 'Consumer'. I labeled the calculated dimension 'Products'. The results in that dimension are 'Professional', 'Consumer', 'Marketing'. The user wants that dimension sort to always be fixed at 'Professional', 'Consumer', 'Marketing' (so not alphabetical) I can not see how to do this. I am trying:
Match(Products,'Professional','Consumer','Marketing') but it still sorts it like this 'Consumer', 'Marketing', 'Professional'
Why won't the match function work? If it's better to do this differently in a load script, how would I do that?
The following sort expression works for me.
=Match(Products,'Professional','Consumer','Market')
Thank you. I realized I missed the = but it's still not working. It should come out in the order I typed them in the expression right? Professional first, then Consumer, then Marketing? I'm getting Consumer, Professional, Marketing which isn't even alppabetical but isn't the way I entered it either. Do you know what can be throwing this off?
Also, when I do the same thing on a non-calculated dimension, it's working perfectly. In that case it's a true field name I'm referencing in the Match function. With the calculated dimension, I give the calculated dimension a 'label', and then that label is what I use in the Match function. Is that how I should be referencing it in Match? The only data being returned that I see are those 3 texts, so it should be doing what I'd hoped but it's not. Any thoughts?
Did you check 'Sort By Expression' checkbox and uncheck everything else?
You may also try replacing 'Products' in the sort expression by the calculated dimension expression.
Yes, everything else is unchecked. I tried your suggestion and put the expession in there instead of the name and I got the same results. Any other thoughts?
I ended up adding the DUAL function in my calculated dimension formula, adding numerics, and then sorting by that numeric. That worked. Anyway, thank you for your input!!!