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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set Analysis

Hi,

how to find country wise sales when flag=1

1 Solution

Accepted Solutions
tresesco
MVP
MVP

=sum({<flag={1}>} Purgechar(sales,'M'))&'M'

Note: Your sales figure is not numeric, better convert them while loading.

View solution in original post

3 Replies
tresesco
MVP
MVP

=sum({<flag={1}>} Purgechar(sales,'M'))&'M'

Note: Your sales figure is not numeric, better convert them while loading.

Anonymous
Not applicable
Author

Make it like this:

=sum({<flag={'1'}, Country={'*'}>}sales)  //If you are mentioning Country={'*'} then both expression like =sum({<flag={'1'}>}sales) are same


if you want it for a specific country like:


=sum({<flag={'1'}, Country={'India'}>}sales)



I have checked your data where Sales field is having string values like 30M,40M where sum() will return 0.

First make sure Sales field shud have value like 30, 60, 70 , mean numeric value then it will work

PrashantSangle

Hi,

Since your sales field is not in number format therefore you can not sum it

1st you have convert it into number then

try sum({<Flag={1},Country=>}Sales)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂