Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use a dimension like below in a chart but the if condition is not displaying the valuelist dimension:
=IF(GetSelectedCount(SomeDim)=0,Legal_Entity_ID,ValueList('Tx','NTx'))
My measure is :
=IF( ValueList('Tx','NTx')='Tx',Variable1,Variable2)
Now, even if I am selecting the "SomeDim", the if condition is still displaying "somedim" and not the Valuelist
Would you be able to share a mock up application where we can see the issue?
You are right, seems like a bug to me... Will give this a shot in QlikView to see if I see the same behavior or not
I am not sure if this will work for you or not, but what you were trying to do with the ValueList() can be done using a Island Table... I have tried to implement this
IslandDim:
LOAD * INLINE [
IslandDim
First
Second
];
Dimension
=IF(GetSelectedCount(Dim) = 0, Dim, IslandDim)
Measure
If(GetSelectedCount(Dim) = 0, Sum(Measure),
IF(IslandDim = 'First', SUM({<[Dim2] = {'z'}>} Measure),
IF(IslandDim = 'Second', SUM({<[Dim2] = {'y'}>} Measure))))
Thank you Sunny. Yeah, I had already done it using the island table method. Was wondering why valuelist does not seem to work.
Not entirely sure of why the ValueList doesn't work.
If not greatly mistaken, I have noticed this behavior in the past. It seems to me that it might not be a bug, but by-design valuelist/valueloop functions are such. Can't really explain the behavior entirely, but it could be something related to - 'scope of evaluation' , i.e. - it is probably evaluated before the actual expression gets evaluated, somewhat similar to $ sign expansion. And you can really not associate it with the data model, since they are NOT associated.
May be @hic , @rwunderlich can help on this here.