5 Replies Latest reply: May 26, 2017 4:27 AM by Sungwoo Chung RSS

    Conditional Sum

    Sungwoo Chung

      Hi I am a beginner to Qlik Sense.

       

      There is a data set where Sales/Account/Segment/Revenue.  I'm trying to make a sum of revenue from a specific Sales with specific Segment, eg. Sum({<[Sales]={"Name A"}>}{<[Segment]={"Segment A"}>}[Revenue]).  But then it shows the specific Segment, but doesn't filter specific Sales.  From the below example, the answer should be 100.

       

      Sales         Account         Segment         Revenue

      Name A     Account A     Segment A     100

      Name B     Account B     Segment A     100

      Name C     Account C     Segment B     50

      Name A     Account D     Segment B     80

      Name C     Account E     Segment A     120

       

      But what I got is all from Segment A.  Not sure what I did wrong.  I'd appreciate your advice using Sum.  Also, would it make sense to use Aggr function as well?

       

      Cheers!