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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Three months earlier

Hello,

Currently I'm working on debt models. I'm trying to extract the 3 months earlier with another table. For example If I do clic on Jan2011 I need to get Nov2011, Dic2011,Jan2011. If I do clic On Feb2011 I need to get Dic2011, Jan2011,Feb2011 and so on. How ca I do achieve this?

I left an attached sample for better comprenhension.

Thank You!

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Simply select a date in ReportMes. You will see that three months in Fecha_Protesto are still 'active' (possible). The others are unselected (excluded) and not counted in the calculations. If I understood you correctly, this is what you were trying to achieve. If so, congratulations!


talk is cheap, supply exceeds demand

View solution in original post

13 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a table like this

ReportMonth, PeriodMonth

Jan2011, Nov2010

Jan2011, Dec2010

Jan2011, Jan2011

Feb2011, Dec2010

Feb2011, Jan2011

Feb2011, Feb2011

etc..

You can then join that table to the other data on PeriodMonth and use ReportMonth to select the Month that determines the period you want to report over. 


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

Hi, Thank you for your reply.

In my new table I added periodo field (join with periodo on table T) But The table appears unable. How could avoid this?

I left a new qv sample.

Thank you!

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I have no idea what's happening. Your Sample.qvw contains no data at all, so I can't tell anything about it.


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

If I reload this qvw will weight 50 MB. Is there another way that you can see the data?

pgalvezt
Specialist
Specialist
Author

Ok! There is.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That helps a lot! In table Tarjetas you have field Periodo, but in Report_Table you have no field with that name. It's named PeriodoMes. So qlikview can't find matching field names in the two tables and thus doesn't join them. If you rename PeriodoMes in Periodo the two tables will be joined and you can use ReportMes to select the appropriate months.

edit: Maybe you want to rename PeriodoMes to Fecha_Protesto. Doesn't that field contain the months of the period?


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

I did that but there is a problem with the date maybe.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes, the formats are different. Make sure the months in Report_Table are the same data type as in the field Fecha_Protesto.


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

Ok I fixed it. Now How can I extract the 3 months? like I explained in my first post?

Thank You!