Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have a table with sales amounts of each department..the department names are the headers and the sales amounts are the rows..
Department 1 Department2 Department3
1000 2000 2200
I have created an inline table with the names of the departments and created a variable to have get selected value of the department name.
trying to use a variable in expression to switch the column name
sum([$(varDepartment)]
so when I change my selection I get the selected department sales... but it is not working..
any idea..
hi
you can use this
=$(='sum([' & $(varDepartment) & '])')
this should do the trick
but if i where you i will do a crosstable load on the original table
to get the table to this structure:
DivisionName,Sales
Division1,1000
Divison2,2000
Divison3 ,2200
then use a list box of the division field for selecting specific division
See if the attached helps.
Best,
Sunny
HI,
Try like this
Variable Declaration:
vDepartment = Depatment 1
Expression =Sum([$(=vDepartment)])
Hope this helps you.
Regards,
Jagan.
hi
you can use this
=$(='sum([' & $(varDepartment) & '])')
this should do the trick
but if i where you i will do a crosstable load on the original table
to get the table to this structure:
DivisionName,Sales
Division1,1000
Divison2,2000
Divison3 ,2200
then use a list box of the division field for selecting specific division
your samples work exactly as i need but it is not working on my data within QlikSense....
thank you.. this worked for me... I cannot use cross table here as the data is used somewhere else too.. so I was looking for a quick solution..
thank you for your help!
I thought you wanted to do this in QlikView because you posted this on QlikView forum. Not sure how Qlik Sense works for the same.