Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Dear Friends
I get an old app done by someone who has left my team, for example below.
I tried google, bing and community searching, but no good answers for me.
Could anybody help me to understand what does it mean of Dimension=$::Demension?
Thank you.
SUM(aggr(
sum({1<[Article Hierarchy 1]=$::[Article Hierarchy 1],[Article Hierarchy 2]=$::[Article Hierarchy 2],[Article Hierarchy Range]=$::[Article Hierarchy Range],[Section]=$::[Section],[Category]=$::[Category],Post_Year={'$(varPreviousYear)'},Country={'China'}>} total<Category,Diameter> Tons)
/sum({1<[Article Hierarchy 1]=$::[Article Hierarchy 1],[Article Hierarchy 2]=$::[Article Hierarchy 2],[Article Hierarchy Range]=$::[Article Hierarchy Range],[Section]=$::[Section],[Category]=$::[Category],Post_Year={'$(varPreviousYear)'},Country={'China'}>} total Tons)
,Category,Diameter,Post_Month
))
Dimension=$::Dimension will only give much meaning when the chart that this entire expression resides in belongs to an Alternate State.
In such a context the dimension of an Alternate State will be assigned the selections from the dimension in the normal/standard state. The $ denotes the standard or normal selection state when it occurs before two semicolons. Instead of the $ another named ID for an alternate state could be used. This would be a developer/user created alternate state.
Since you are posting this in a Qlik Sense group I guess that you have a QlikVikew application that has this expression and you want to get it converted to a Qlik Sense application. If that is the case you should know that Alternate states are not implemented in the standard chart/table types of Qlik Sense although the developer API and the Qlik Inference Engine and Calculation Engine supports this. Meaning that is hard for you to translate this from a QlikView application into something very similar in a Qlik Sense applcation.
The QlikView reference: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Alternate%20States.htm
Thank you, Petter.
You are right this formula was copied from qlikview. So...
I think I have to talk with business for the logic and rewrite entire formula in qlik sense.
You can get some of the same effect by using:
Alternate States are most often used for Comparative Analysis. However there are other ways like I mentioned to do the comparative analysis...
Dimension=$::Dimension will only give much meaning when the chart that this entire expression resides in belongs to an Alternate State.
Petter, I don't completely agree with this, but correct me if you think I am wrong.
I think this can also be used in an inherited state when used with 1 to ignore selection... which the above expression is doing
SUM(aggr(
sum({1<[Article Hierarchy 1]=$::[Article Hierarchy 1],[Article Hierarchy 2]=$::[Article Hierarchy 2],[Article Hierarchy Range]=$::[Article Hierarchy Range],[Section]=$::[Section],[Category]=$::[Category],Post_Year={'$(varPreviousYear)'},Country={'China'}>} total<Category,Diameter> Tons)
/sum({1<[Article Hierarchy 1]=$::[Article Hierarchy 1],[Article Hierarchy 2]=$::[Article Hierarchy 2],[Article Hierarchy Range]=$::[Article Hierarchy Range],[Section]=$::[Section],[Category]=$::[Category],Post_Year={'$(varPreviousYear)'},Country={'China'}>} total Tons)
,Category,Diameter,Post_Month
))
What this is doing is ignoring all selections (because it has 1) in all fields except the ones which uses Dimension = $::Dimension.
Yes - I agree with you ... I didn't think about that when I gave a response - thank you for making us aware of that!