Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
idodel
Contributor III
Contributor III

IntervalMatch double data error

Hi all!

I am using IntervalMatch() function in Qlikview in order to add new column to the model called Period (divides the year into 13 periods).

I did it with the table:

idodel_3-1620211882561.png

 

and the script:

idodel_0-1620212325185.png

 

Each 13 rows are for financial year.

After I did it, it looks like in P1 (when filtered in UI) holds also some dates from row 15 - which is wrong because this row is belong to the second financial year.

How can I solve it ?

I verified it by removing rows 15-27 and it works fine, but I need all the data.

Thanks for all

Labels (3)
3 Replies
mfchmielowski
Creator II
Creator II

Hi.

This what you've writen that is wrong is (tbo) correct. Value P1 can be in many years, it will depends on how many years you'll have in PeriodsTable.
You can add column named fe. periodYear and filter only period and year you are interested in.

idodel
Contributor III
Contributor III
Author

Hi I had the Financial years in the model already, so I wished it will be synchronized well with the periods, which did not happened.

I added a new column with it, hope it will be good enough

Thanks

 

mfchmielowski
Creator II
Creator II

Look from this side: 

SomeTable:
load num(month(eventDate)) as eventDateMonth, eventDate inline [
	eventDate
	2019-01-01
	2019-02-01
	2020-01-01
	2020-02-01
	2021-01-01
	2021-02-01
];

This will give you view like this:

mfchmielowski_0-1620217825652.png

Month numbers 1 and 2 are in every year. Without the dimension for year you'll get every year in the model.