Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

WeekName

Hi

my Aim is to get this type of format where the week starts from week-1, This week, week+1, week+2 etc

error loading image

Now I have No date in my data but only week and Year.

I need to add new Expressions in the chart above where I have to define according to Week-1 and week

I tried to create two Variables for two weeks(This week and Lastweek) like this

Let vCurWeek = WeekName(Today());
Let vLastWeek = WeekName(Today()-7);

The output is

vCurWeek= 2011/15 shows correct but gives a number when Defined in a textbox

vLastWeek=2011/14 shows also correct and gives a number when Defined in a textbox

My idea was to change the present YYYYWW[Year week] from above chart to YYYY/WW and based on the variable to change the Chart. The chart must change everyweek dynamically.

Any ideas how to achive it?

Regards

sravan

1 Solution

Accepted Solutions
Not applicable
Author

Hi sravan,

as you know: "Ein Bild sagt mehr als tausend Worte" or: Example-data is always better then the best description.

I was able to solve first and third topic with formulas as mentioned in my post above. See var. $(vCurWeek) and dim. Week_RK. But second topic is excel, Summing up from different cells. QV works very fine with tables, rows, but not with single cells. As a hint, you can try to use SET Analysis and $(vCurWeek) in your expressions to solve it.

Regards, Roland

View solution in original post

9 Replies
sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi Sravan,

If my understanding is correct then it ll work.

u have year, then use (Year * 100) + WeekNo

ex : year = 2011, week = 12 then (2011 * 100) + 12 it gives 201112

- Regards

Sathish

Not applicable
Author

HI sathish,

Thanks for ur answer. I think I am not clear. For Defining further expressions with previous week , present week etc, I need Dynamic interpretation of weeks( For Ex week-1, week, week+1)

I am trying to achieve this. Those weeks are already present in my Data. As I said Year and week are present in the data.

Regards

Sravan

Not applicable
Author

Hi sravan,


sravan wrote:My idea was to change the present YYYYWW[Year week] from above chart to YYYY/WW


I would prefer the other way round, like

Replace(WeekName(Today()), '/', '')
gives 201115 as result. For my oppinion very well to calculate with eg. the previous Week would be Replace(WeekName(Today()), '/', '') -1


sravan wrote:The chart must change everyweek dynamically.


Same as above, use this expression within a calculated dimension very dynamically like

IF( [Year week] >=Replace(WeekName(Today()), '/', '') , [Year week])


HtH

Roland

Not applicable
Author

HI Roland,

Thanks. I made an Example as you were writing. Hope you can help me.

I am trying to get as in the excelsheet.

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1033.Shortage-Reporting.xlsx:550:0]

The Qlikview Example is attached

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.49.52/Shortage-Reporting.qvw]

Regards

Sravan

Not applicable
Author

Hi sravan,

as you know: "Ein Bild sagt mehr als tausend Worte" or: Example-data is always better then the best description.

I was able to solve first and third topic with formulas as mentioned in my post above. See var. $(vCurWeek) and dim. Week_RK. But second topic is excel, Summing up from different cells. QV works very fine with tables, rows, but not with single cells. As a hint, you can try to use SET Analysis and $(vCurWeek) in your expressions to solve it.

Regards, Roland

Not applicable
Author

Hi Roland,

Das ist wahr! "Ein Bild sagt mehr als tausend worte"

Thankyou verymuch. I am trying with Setanalysis to solve the second Problem.

I wonder, I am the only one getting such tasks with Single Cells. Ya with Qlikview it is difficult to solve Single cells but I will give a try here.

Wish me Luck!

Vielen Dank

Sravan

Not applicable
Author

Viel Erfolg.

Not applicable
Author

HI roland,


setanalysis is not my cup of tea and as you said single cells tasks are difficult in Qlikview

I am struggling with this and opened another thread for that problem here

http://community.qlik.com/forums/t/44156.aspx

Thanks

Sravan

Not applicable
Author

Hi Sravan,

I enjoy helping you, but as you said: this is not my cup of tea.

RR