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: 
timothyj
Creator
Creator

Having Trouble Matching Dates

I have a product that changes price periodically. I need to be able to flag the latest price. I have the State, Area and Gender along with implementation date and price. I use a combination of State, Area, and Gender to get a Aggr Key and then use an Aggr function in a calculated dimension to get the Max Date. All this seems to work. All I have to do now is flag where the Imp Date matches the Max Date. I just cannot get this to work. I have tried as dates, numbers and text. I just cannot get dates to match. I have searched and Googled and spent many hours on this. I just cannot figure it out. Any ideas. Attached is a sample qvw.

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try this as calculated Match dimension:

=Aggr(if(Max(Total<[AGGR KEY]> [Imp Date])=[Imp Date],1,0),[Imp Date], [AGGR KEY])

View solution in original post

2 Replies
swuehl
MVP
MVP

Try this as calculated Match dimension:

=Aggr(if(Max(Total<[AGGR KEY]> [Imp Date])=[Imp Date],1,0),[Imp Date], [AGGR KEY])

timothyj
Creator
Creator
Author

Wow, that works perfectly!

Why does it work?