Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jlakehivewyre
New Contributor III

Create master measure calculating a selection of data

Hello again Qlik Community,

I have a set of data, for this exercise I'll identify a real small example:

AccountSharing StatusRevenue
CoolshortsSharing$435.76
NicejeansNot Sharing$1009.16
SmallpocketNot Sharing$32.12

Ultimately, I want to create a Master Measure that sum's up all Revenue of those that are "sharing" and a second one to sum up all Revenue of those "not Sharing".

I've tried things like if([Sharing Status] = 'sharing', sum([Revenue]) but that's not working.  I'm sure there's a way to do this, but I just can't figure it out (and my knowledge of expressions is still very limited).

I appreciate any help!

Tags (1)
1 Solution

Accepted Solutions
zebhashmi
Valued Contributor

Re: Create master measure calculating a selection of data

Sum({<Sharing Status= {'Sharing'}>}Revenue)

and

Sum({<Sharing Status= {'Not Sharing'}>}Revenue)

(If) should work Qlik is Case sensitive make sure you are taking care of it

if([Sharing Status] = 'sharing', sum([Revenue]))

Or

sum(if([Sharing Status] = 'sharing',[Revenue])



2 Replies
zebhashmi
Valued Contributor

Re: Create master measure calculating a selection of data

Sum({<Sharing Status= {'Sharing'}>}Revenue)

and

Sum({<Sharing Status= {'Not Sharing'}>}Revenue)

(If) should work Qlik is Case sensitive make sure you are taking care of it

if([Sharing Status] = 'sharing', sum([Revenue]))

Or

sum(if([Sharing Status] = 'sharing',[Revenue])



jlakehivewyre
New Contributor III

Re: Create master measure calculating a selection of data

Thank you - I applied your first option, and it worked.  I'm getting just what I need.

Many Thanks!

Community Browser