Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
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
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Then your expression will be.

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

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

Kaushik -

I think you meant this:

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks Sunny..

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
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