Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
KKumar92
Contributor III
Contributor III

Using If Condition to Calculate Sum of Sales

Hi,

 

Please refer the sample data set below, I want to calculate the total sales of each hotel, using if Condition.

I used the following expression : Sum({<PropertyName = {'Hotel001'}>}Revenue), but this return the output as "0".

Guidance on this matter is highly appreciated.

ACCOUNTIDPropertyNameRevenue
11Hotel 001 $  15,000.00
12Hotel 001 $    7,500.00
13Hotel 001 $    2,000.00
14Hotel 001 $    4,000.00
15Hotel 002 $    4,200.00
16Hotel 003 $    3,500.00
17Hotel 004 $    2,150.00
18Hotel 002 $    2,360.00
19Hotel 003 $    5,410.00
20Hotel 004 $    6,500.00
21Hotel 004 $    2,500.00

 

Labels (2)
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Sum({<PropertyName = {'Hotel 001'}>}Revenue)

This should work, seems like you missed a space there...

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

Sum({<PropertyName = {'Hotel 001'}>}Revenue)

This should work, seems like you missed a space there...

KKumar92
Contributor III
Contributor III
Author

Thanks for the instructions, I got the expected Output.