Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have what I hope to be a simple problem:
I created two alternate states:
Period1
Period2
I then added the same period dimension to my sheet twice as filter panels and applied the alternate state to each.
I created the following variance measure:
Sum({Period1}[Sales Amount USD]) - Sum({Period2}[Sales Amount USD])
This works perfectly and shows me the total sales amount variance between whatever period(s) that I select from the filter panels. This gives flexibility to do several different time period variances without creating multiple set-analysis expressions.
However, now I have the simple request to filter the data. For example, say I want to filter by a country (i.e. US or Canada). How can I filter these measures further?
Assuming you are making the other selections, like Country, in the default state, just include the default state with the intersection operator:
Sum({Period1 * $}[Sales Amount USD]) - Sum({Period2 * $}[Sales Amount USD])
If you want to make sure your period selections only come from the alternate states, add set modifiers as shown here:
https://qlikviewcookbook.com/2016/07/alt-states-merged-selections-tip/
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Assuming you are making the other selections, like Country, in the default state, just include the default state with the intersection operator:
Sum({Period1 * $}[Sales Amount USD]) - Sum({Period2 * $}[Sales Amount USD])
If you want to make sure your period selections only come from the alternate states, add set modifiers as shown here:
https://qlikviewcookbook.com/2016/07/alt-states-merged-selections-tip/
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
This worked perfectly and thank you for information on the set modifiers!! 🙂