Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating different values depend choosing different values in listbox

Good day!

In my model i load data from excel file.

Then i calculate sum of fields (Weight, Volume l.) in one expression depend choosing value in list box.

When i choose 'Weight' - it's working.

But when i choose 'Volume l.' - calculating expression is not working.. I think, it's connected with 'space' in name of field Volume l.

Can anyone solve this problem?

1 Solution

Accepted Solutions
Kushal_Chawda

Please see the attached file.

Your approach is correct but just required little modification in variable

View solution in original post

10 Replies
MK_QSL
MVP
MVP

Use below expression

=IF(GetFieldSelections(Title)='Weight', SUM(Weight) , SUM(Объем))

ankit777
Specialist
Specialist

try like this

Anonymous
Not applicable
Author

Thanks.. but i need use expression w/o condition with if construction

ankit777
Specialist
Specialist

Then try like this

Anonymous
Not applicable
Author

Sorry, but i need to calculate both of values in ONE expression, using variable value.

It's main idea of my task.

ankit777
Specialist
Specialist

can u rename this field Объем to Volume l.? Then your original file will give correct solution.

Kushal_Chawda

Please see the attached file.

Your approach is correct but just required little modification in variable

Anonymous
Not applicable
Author

No, it's not working

Anonymous
Not applicable
Author

Thank you!!!