4 Replies Latest reply: Jul 26, 2018 2:51 AM by Piotr Lisiewicz RSS

    Filter with limited value and sum with set expression

    Piotr Lisiewicz

      Hi, i have a question, is there a better way to resolve this issue.

      I have a data with sales by country:

      SALESCOUNTRY:

      Load *

      Inline [COUNTRY, SALES

      USA, 5

      CANADA, 4

      CHINA, 8];

       

      I want to show a filter only with USA and CHINA so i have created a field COUNTRY_USA_CHINA = IF(MATCH(COUNTRY, 'USA','CHINA'),COUNTRY)

       

      I Want to show a KPI showing only sales for USA, so a have created a SUM with SET expressions:

      SALES_USA = SUM({<COUNTRY = {'USA'}>} SALES)

       

      The problem is, when i select CHINA from filter COUNTRY_USA_CHINA , sales in field SALES_USA is showing 0. Why? Set expression should disregard the current selection.

       

      Is there a way to resolve this issue without calculating COUNTRY_USA_CHINA is QVD?


      SALES_USA.png