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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

populate all dates in a pivot table

Hello

got 2 tables (transactions and master calendar)

both tables are linked by the date field

I have a pivot table with on dimension (date)

and 1 expression

what I want is the following

I select a range of dates say 1/1/2015 till 31/1/2015

now I have 2 transactions in 15/1/2015 and 17/1/2015

however I want the pivot table to display all the dates from 1/1/2015 till 31/1/2015 and so for the dates with no transactions I want to display zeros

Please advise

I can walk on water when it freezes
15 Replies
Clever_Anjos
Employee
Employee

Try

SUM (

  {

  <

  [MOVEMENT FLAG]={'00'}

  ,FLAG={'RECEPTION'}

  ,S2TCNT = {'P'}

  ,Year=

  ,Month=

  ,Day=

// ,PeriodDate=

  ,PeriodDate={">= $(vFromDate) <=$(vToDate)"}

  >

  }S2QCNT

  )

+ 1/10000000000

ali_hijazi
Partner - Master II
Partner - Master II
Author

may you please send me a sample for the screen shot that you put?

I can walk on water when it freezes
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=sum({<flag={1}>}sales) + (0 * Sum(Sales)


Regards,

Jagan.

rubenmarin

Hi Ali, the option to simple add a +Sum(0) didn't worked?

marcus_sommer

Here an extend of the example-app from Ruben with a solution per conditions on the dimensions. But I must admit that I like more the solution from Ruben - you have now a choice and could check which solutions is in your real application more suitable.

- Marcus

ali_hijazi
Partner - Master II
Partner - Master II
Author

nop

I can walk on water when it freezes