Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
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
Highlighted
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