Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

KPI Chart

What I want to do is display in a KPI chart is the total sum of a range from a table chart in total negitive and total positive the expression I'm using is :

=num(Sum(aggr(sum(TOTQTY),PART_NUMBER)) - Sum(aggr(sum({<[HM000_WAREHOUSE]={1}>}[HM000_MOHTQ]),PART_NUMBER,[LOCATIONS-SYNONM],Planner))*[Standard Cost],'£#,##0.00;-£#,##0.00')

 

This calculates the cost of parts against on hand stock the plus and minus values are for stock control . Any help would be greatly appreciated

1 Reply
Partner
Partner

Hi Eaun,

The reason why it's probably not working is because of the * Standard Cost. This is a field and needs to be inside the aggregation.

num(
  Sum(
    aggr(
      sum(TOTQTY)
    ,PART_NUMBER)
  ) 

- Sum(
    aggr(
      sum({<[HM000_WAREHOUSE]={1}>}[HM000_MOHTQ]) * [Standard Cost]
    ,PART_NUMBER,[LOCATIONS-SYNONM],Planner)
   )
,'£#,##0.00;-£#,##0.00'
)

 

 Jordy

Climber

Work smarter, not harder