Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I found the extension to Qlik Sense to use Alternative states.
In the Example they show this way
Sum(Sales) - For main group
Sum({Alt} Sales- for comparison group.
I already created the group but i have a doubt.
I want to do this
Sum({$<Year={'$(vMaxYear)'}>} Sales) for main group
=Sum({Alte}{$<Year={'$(vMaxYear)'}>} Sales) - for comparison group
Anyone can help me in syntax?
thanks in advance
Bruno Paulo
Try this
=Sum({Alte<Year={'$(vMaxYear)'}>} Sales)
And just complicating a bit
=Sum({$<Year={'$(vMaxYear)'}>} Sales)
/
Sum(Total{$<Year={'$(vMaxYear)'}>} Sales)
and
=Sum({Alte<Year={'$(vMaxYear)'}>} Sales)
/
Sum(Total{Alte<Year={'$(vMaxYear)'}>} Sales)
the second one is wrong can u help me?
Thank you for the perfect anwser on the 1st one.
Regards
Bruno
Looks right.... can you share the image of what you getting with both the expressions?
I'm getting 100% on second expression
You have year as your chart dimension?
Isn't a bar chart its a KPI object
TOTAL qualifier does nothing in a KPI object... so you are basically dividing the same number in the numerator by the same number in the denominator to get 1 (or 100%)... what is the goal here?
I know, but when i select a customer or a product the KPI should give me the percentage of that customer or product in total sales, but when i select it keeps give me 100%
Try this
=Sum({Alte<Year={'$(vMaxYear)'}>} Sales)
/
Sum({Alte<Year={'$(vMaxYear)'}, Customer, Product>} Sales)