Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Excluding specific reason from chart

Hi, can anyone tell me how i would write an expression to show me waste values but excluding a specific reason please?

My fields are :

StockValue

Narrative

There are 2 waste Narrative reasons:

Wastage and WASTAGE

I want to exclude the uppercase WASTE from my results (so i don't want them being added up in the total and i don't want them to display in the chart)

Currently i have a simple expression...

Sum(StockValue)

but this show's me both Narratives. I don't want to have a list box for the user to just select Wastage as our average users wouldn't know the difference between the 2 Narratives.

Basically WASTAGE is a system generated reason when the user downloads waste figures using an older program (this program should only be used for FREEZER BREAKDOWNS but now and again some of our customers use it by mistake)

Wastage is the reason generated using the correct program.

Any help would be appreciated..

Thanks

11 Replies
Not applicable

Hi hopkinsc

Maybe you can use a Calculated Dimension instead the expresión with Set Analysis.

IF(MATCH([Narrative],'WASTAGE','DAMAGED')= 0, [Narrative])

The WASTED and DAMAGED data willl show with NULL value, then just you can Suppress the dimension when value is null.

Hope this help

Regards.

erichshiino
Partner - Master
Partner - Master

You can include another field in your load statement:

Load ...

Narrative,

If( Narrative = 'WASTAGE' or Narrative='DAMAGED', 1, 0) as flagNarrative

FROM / Resident ....

Then,  using set analysis on the chart:

sum  ( {<flagNarrative ={0}>} StockValue) /

sum  ( {<flagNarrative ={0}>} StockQty)

Hope this helps,

Erich