Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
Eaun
New Contributor II

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

Tags (1)
1 Reply
Partner
Partner

Re: KPI Chart

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