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: 
markgraham123
Specialist
Specialist

get current week as dimension in Bar chart

Hi Everyone,

I'm working on a bar chart, where X-axis should be current week latest 7 days.

I tried =(WeekDay) in dimension

but no luck.

Can someone help pls.

9 Replies
swuehl
MVP
MVP

Not much information given about the fields in your data model etc.

Just guessing, try a calculated dimension like

=If ( DateField >= Today()-7 and DateField <=Today(), DateField)

Replace DateField with your date field.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

What does you data model looks like?

What field do you have to generate the date from?

More information will be helpful

MarcoWedel

you could also limit the dates using a set expression or with dimension limits.

hope this helps

regards

Marco

Anonymous
Not applicable

Or, if you reload at least once a day, create an additional field in your calendar that includes the last 7 days, and use it as chart dimension.

markgraham123
Specialist
Specialist
Author

Hi,

There is a date field.

But cant i take by specifying today() function rather than using any field in the data model??

I mean by using Set analysis??

markgraham123
Specialist
Specialist
Author

Hi,

I have a "date" field.

markgraham123
Specialist
Specialist
Author

Hi Michael,

That is what i'm exactly looking for.

I was struck how to generate a dimension using Today() function to get latest 7 days starting from yesterday..

Can you please throw some lime light..

tchovanec
Creator II
Creator II

Mark,

I have attached an example of building a master calendar along with a date concept table. You can create a date concept for the last 7 days and then use that is set analysis to get the last 7 days all the time.

markgraham123
Specialist
Specialist
Author

Thanq Thomas