Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am facing a problem in making a expression independent of selection for one field , as I am using 2 dimension one is valuelist and other one is Financial month , and in the expression I want to see the data for the complete year but when I am using selection in Financial month it is selecting that month data and not showing all the months so not sure that it is due to valuelist function or I am doin some mistake.
Thank you
Ferha
Ok, that's a bit weird. But try this: If(only({<Month=>}ValueList('A','B'))='A',Sum({<Month=>}Amount),If(only({<Month=>}ValueList('A','B'))='B',Sum({<Month=>}Value)))
You need to add something to your expressions to make them ignore selections in the financial month field. For example if you have sum(Amount) then change it to sum({<[Financial Month]=>}Amount) to ignore selections in the field [Financial Month].
Yes I did that , I have a expression like if(valuelist('Gross','Income')='Gross', sum({<[Financial Month]=>}Amount)) as I have Financial Month as second dimension , but is not giving value for all the month , it is giving value for the selected month not sure because of valuelist function or is there any other way.
Please post an example qlikview document that illustrates the problem.
In the sample application I want to see all months data even if month is selected, i.e independent of month selection.
Ok, that's a bit weird. But try this: If(only({<Month=>}ValueList('A','B'))='A',Sum({<Month=>}Amount),If(only({<Month=>}ValueList('A','B'))='B',Sum({<Month=>}Value)))
Yes, a bit weird! but a simpler expression without nested IF works. Try:
If(ValueList('A','B')='A',Sum({<Month>}Amount),Sum({<Month>}Value))
HI
PFA
Or, for multiple comparisons, you may go for pick(match()..combination like:
Pick(Match(only({<Month>}ValueList('A','B')), 'A','B'), Sum({<Month>}Amount),Sum({<Month>}Value))
Thank you Gysbert it is working and yes it is a bit weird as well thanks again...