Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Table / Subtotals whithout detail lines at zero

Hi Guys,
A small question to improve your skills (mine? )
I have a pivot table that shows stock figures with countries, locations, suppliers and items as Dimensions and quantity and cost as Expressions.
Some of the items have a quantity = 0 with a cost <> 0
I had a test with IF in my expressions not to show Qty and Cost : it works well.

My issue is in the subtotals : they show totals including items at 0 quantity even if they don't appear in the pivot table.
I would like totals without those lines at 0 quantity
If someone had a magic idea, it mould be very appreciated

Best regards

Mederic

2 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Can you post your expressions?

Not applicable
Author

Hi Jason,
Find below the expressions for the Quantity and the Cost :

= IF(sum({< Calendrier.Année = {*} , Calendrier.Mois = {*} , Calendrier.Date = {"<=$(=Date(vDate_End))"} >}
SUIVI_STOCK.Quantity)>0
,sum({< Calendrier.Année = {*} , Calendrier.Mois = {*} , Calendrier.Date = {
"<=$(=Date(vDate_End))"} >}
SUIVI_STOCK.Quantity)
,0)


= IF(sum({< Calendrier.Année = {*} , Calendrier.Mois = {*} , Calendrier.Date = {"<=$(=Date(vDate_End))"} >}
SUIVI_STOCK.Quantity)>0
,sum({< Calendrier.Année = {*} , Calendrier.Mois = {*} , Calendrier.Date = {
"<=$(=Date(vDate_End))"} >}
[SUIVI_STOCK.Unit price])
,0)

Sorry, the calendar fields are in French.