Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
migueldelval
Specialist
Specialist

Use only 5 values for a dimension(date)

Hi Community,

I need to solve a question.

I have a date field and I can select any date for all document.

Now I need to create a line chart who uses date as dimension and sum(Clients) as expression.

The problem is that I need to use only selected week and four previous weeks.

Can anybody help me?

Regards

Miguel del Valle

1 Solution

Accepted Solutions
sunny_talwar

Kaushik -

I think you meant this:

Sum({<Date = {">=$(=WeekStart(Max(Date)-28))<=$(=Max(Date))"},Week=>}Clients)

View solution in original post

6 Replies
kaushiknsolanki

Hi,

Then your expression will be.

Sum({<Date = {">=$(=weekstart(Max(Date)-28))>=$(=Max(Date))"},Week=>}Clients)

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
sunny_talwar

Kaushik -

I think you meant this:

Sum({<Date = {">=$(=WeekStart(Max(Date)-28))<=$(=Max(Date))"},Week=>}Clients)

kaushiknsolanki

Thanks Sunny..

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
migueldelval
Specialist
Specialist
Author

Hi Sunny & kaushik.solanki,

Your option it´s correct, Thanks.

But only If I use:

=Sum({<Semana={">=$(=WeekStart(Max(Semana)-28))<=$(=Max(Semana))"}>}Clients)

Do you Know why?

Regards

Miguel del Valle

sunny_talwar

So you mean if you remove Week =, then it works, otherwise it won't? Do you have a Week field in your application?? if you don't then kaushik.solanki‌ used Week field just as placeholder for your actual field. And the reason to add Week = in there is to ignore any selection in week field. If you don't plan to make selections in week field, then you might not even need it.

Best,

Sunny

migueldelval
Specialist
Specialist
Author

Thanks Sunny,

The Mistake was in my question. I spoke about "select a week", but I only have date field and I make week(date) to refill dimension.

Regards

Miguel del Valle