Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for
Did you mean:
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
MVP

Kaushik -

I think you meant this:

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

6 Replies

Hi,

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!
MVP

Kaushik -

I think you meant this:

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

Thanks Sunny..

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

Hi Sunny & kaushik.solanki,

But only If I use:

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

Do you Know why?

Regards

Miguel del Valle

MVP

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

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

Community Browser