Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
danipudianto
Contributor
Contributor

How to fill date in a month with data ?

Dear All,

I have Data Like This :

Testing:

LOAD

* INLINE [

    Year,Month,Tgl,Qty,Code

    2011,1,1,100,A

    2011,1,3,200,B

    2011,1,5,300,A

    2011,2,3,1,A

    2011,2,4,5,B

    2011,2,7,8,B

    2011,2,9,10,A

    2011,2,10,12,A

];

If I Select Month =1

the table shown like this

Untitled1.png

But I want the result like this :

Untitled.png

Can We ?

I Attach example Files

Thanks All for help

8 Replies
Michiel_QV_Fan
Specialist
Specialist

Without opening your attached file.

Basically you cannot build that table because the dates aren't in the data.

You need a master calendar that generates also the missing data and then use that in your chart and deselected hide when zero and/or show all values in your dimension.

I suggest using qlikview components to generate your masster calendar: GitHub - RobWunderlich/Qlikview-Components: A library for common Qlikview Scripting tasks

buzzy996
Master II
Master II

u can with applymap(), create a another table with field Tlg with data from 1 to 30 and use applymap.

Anil_Babu_Samineni

You are mentioned If i select 1 then what was the intend

Q) If you select 2 then you want to show till 28 Days / What? What if the year has Leap year that case you want to show 29 on your Pivot Table

Interesting and make sense tooooo

Highly recommend for marcowedeljaganmrkachhiaimpstalwar1mrkachhiaimp

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MK_QSL
MVP
MVP

Testing:

LOAD

  *,

  Date#(Year&Month,'YYYYM') as YearMonth,

  Year&Month&Tgl as %Key

INLINE

[

  Year,Month,Tgl,Qty,Code

  2011,1,1,100,A

  2011,1,3,200,B

  2011,1,5,300,A

  2011,2,3,1,A

  2011,2,4,5,B

  2011,2,7,8,B

  2011,2,9,10,A

  2011,2,10,12,A

];

NoConcatenate

Temp:

Load Date, Year(Date) as Year, Month(Date) as Month, Day(Date) as Tgl;

Load

  Date(MinDate + IterNo() - 1) as Date

While MinDate + IterNo() -1 <= MaxDate;

Load

  MonthStart(Min(FieldValue('YearMonth',RecNo()))) as MinDate,

  MonthEnd(Max(FieldValue('YearMonth',RecNo()))) as MaxDate

AutoGenerate FieldValueCount('YearMonth');

Join (Temp)

Load Distinct Code Resident Testing;

Concatenate(Testing)

Load * Where Not Exists(%Key);

Load *, Year&Num(Month,'0')&Tgl as %Key Resident Temp;

Drop Fields %Key, YearMonth;

Drop Table Temp;

Use the same Pivot table/Straight Table.

Go to presentation tab and untick Suppress Zero Values.

danipudianto
Contributor
Contributor
Author

It's not like That.

Number 1 show month Jan, 2 = Feb

Jan consist of 31 days, Feb=28 day

If I select Jan (1), all day in Jan show in view even no data

So also I select Feb (2), all day in Feb show in view even no data

It's my question mean

Thanks

danipudianto
Contributor
Contributor
Author

Thanks for your response

I will try

danipudianto
Contributor
Contributor
Author

Thanks Manish

I will try to implement

danipudianto
Contributor
Contributor
Author

Hai Manish,

If I add field SubInv (IF1 and IF2)

and I make List Box with SubInv Field

How query in qlikview ?

Thanks