12 Replies Latest reply: Oct 23, 2017 5:01 AM by Mike Slottje RSS

    Using if statement in KPI object

    Mike Slottje

      Hi guys,

       

      in a KPI object I want to show the total amount of accounts that we've prepaid.

      This means, that I want to show the total sum of a measure if this is > 0.

       

      I tried the following script:

       

      if(SUM({<[Outstanding invoices flag AP]={'y'}>}[Remaining Amount AP])>0,SUM({<[Outstanding invoices flag AP]={'y'}>}[Remaining Amount AP]))

       

      Unfortunately, the KPI object only shows a minus sign as outcome.

       

      When I'm using a table with the vendor name and the outstanding invoices flag as dimensions, the measure expression written below works.

      if(sum([Remaining Amount AP]) > 0, sum([Remaining Amount AP]) )

      How should I convert the total amount from the table into a KPI object?

       

      Your help is much appreciated!

      Mike

       

       

       

      EDIT: I've attached an example Excel file with vendors, status and remaining amount. Hopefully this helps.