5 Replies Latest reply: Jul 3, 2012 2:08 PM by rtuttle1 RSS

    Set Analysis on a Data Island

      I am new to Qlikview and I cannot figure out how to solve this issue.  I have a data island and I want to calculate total payments from this data island.  I have a chart that has dimensions of vendor and year.   I am trying to figure out the expression to use to pull the correct payment totals.  The data island has a Payment Year and Payment Vendor.  So basically I want the payment total on each line to be the sum of all payments were Payment Year = the current row’s dimension year and Payment Vendor = the current row’s dimension vendor.  I have tried all the following combinations but none of them seem to work.  Any help would be greatly appreciated.

       

      - sum({$<PaymentFiscalYear=FiscalYear,PaymentVendor=Vendor>}  Payments)

      - sum({$<PaymentFiscalYear=P({$}FiscalYear),PaymentVendor= P({$}Vendor)>}  Payments)

      - sum(if(PaymentFiscalYear=FiscalYear,if(PaymentVendor=Vendor,Payments)))

      - sum(if(PaymentFiscalYear=FiscalYear and PaymentVendor=Vendor, Payments))

      - sum({$<PaymentFiscalYear=P({$}FiscalYear),PaymentVendor=P({$}Vendor)>}  distinct if(PaymentFiscalYear=FiscalYear,if(PaymentVendor=Vendor,Payments)))

      - sum({$<PaymentFiscalYear=P({$}FiscalYear),PaymentVendor=P({$}Vendor)>} if(PaymentFiscalYear=FiscalYear,if(PaymentVendor=Vendor,Payments)))

      - sum({$<PaymentFiscalYear=P(FiscalYear),PaymentVendor=P(Vendor)>} if(PaymentFiscalYear=FiscalYear and PaymentVendor=Vendor,Payments))

      - if(PaymentFiscalYear = only(FiscalYear) and PaymentVendor = only(Vendor),sum(Payments))