Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to format the set analysis code?
what kind of formatting are you talking about.
Could you provide some example as to what you are trying to achieve.
Hello,
What do you mean by "format the code"?
Regards
Vincent
As long as it gives you the correct results (interpenetrated correctly by QlikView) can you format the code in the way you find it easy to read and work with. I rarely write set analysis expressions that are of the length or complexity that it requires to split up into multiple rows to be easy to understand.
Some time set analysis code contains numerous conditions and calculation.
It is better to break and format the code with in editor for better readability
Format the code in whatever way works for you.
Hi,
If you're using an expression with set analysis inside a text object or any other object that doesn't have the number tab in properties, you can apply format with functions,
for example,
let's suppose you have this expression:
Sum({$<Country={'Mexico'}, Year={ $(=Max(Year) }>} Sales)
if you don't apply any format it will appear with default formatting,
then if you wanted to give some format to the number, you could do this:
num(Sum({$<Country={'Mexico'}, Year={ $(=Max(Year) }>} Sales), '$#,##0.##')
this way the result will be a number with $ symbol, a comma every threee number and two decimals for cents,
regards