Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last 4 weeks data in bar chart

Hi all,

I need to display weekly count bars for client specific.

Each bar for one week so i need to display total 16 bars 4 for one client.

I have attached the sample .qvf anyone help on this.

Thanks,

Kumar

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hii,

PFA the resulted output.

Hope this is what you required.

Thanks,

Vignesh

View solution in original post

15 Replies
jagan
Luminary Alumni
Luminary Alumni

HI,

Check this link for set analysis expressions, use Client and Week as dimensions.

Set Analysis for certain Point in Time

Regards,

jagan.

Not applicable
Author

jagan, How can i use two dimensions?

Dimension:If(match(client_id,'15','12','13','19','6'),client_id)

Measures:

1. count({$<Year=, Quarter=, Month=, Week=, Date={‘>=$(=WeekStart(Today(), -3))<=$(=Today())’},

DateType = {invitation}>} invitation_id )

2. count({$<Year=, Quarter=, Month=, Week=, Date={‘>=$(=WeekStart(Today(), -3))<=$(=Today())’},

DateType = {accessed}>} Landing_page_accessed)

And i need weeks as bar and x-axis labels as client and legend should be the last 4 weeks dates representing the bars.

I'm bit confused please explain it

Can anyone explain this.

reddy-s
Master II
Master II

Hi Promodgc3,

Will concatenating these two dimensions into one dimension solve your issue?

And it would be easier to solve the issue, if you can provide a sample file.

Not applicable
Author

I have attached the sample qvf file. please check and help on it.

reddy-s
Master II
Master II

Hi Promodgc3,

One of the dimensions is the client_id, which is the other dimension you need?

Not applicable
Author

week_group.

For those clients i need last 4 weeks data.

Dimension:

1. =If(match(client_id,'15','12','13','19','6'),client_id)

2. Week_group

Measures:

count({< DateType = {invitation}>}invitation_id)

4bars for each client. each bar showing the count of that week.

and also i need to customize the bars colour : : Light Gray, Dark Gray, Light Blue & Dark Blue.

Advance thanks,

Please help on it

reddy-s
Master II
Master II

Hi Pramodgc3,

Can you please add the below code to your script to flag the last 4 weeks?

Capture.PNG

Not applicable
Author

error.png

Getting error while i load.

if ((week_number > (week(today()) - 4)),1,0) as last4weeks;

reddy-s
Master II
Master II

Hi Promod,

Sorry id I am being silly, did you miss a semicolon there?

And the last Conocial date for 2015 is no updated I beleive?

Capture.PNG