Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rkpatelqlikview
Creator III
Creator III

Wrong weeks in Last 12 weeks in Bar chart

Hi Qlik,

I have given expression for Week. I need to show last 12 weeks but after selection its showing like this.

I need to last 12 weeks even there is no data.

In bar chart unchecked these options -> Suppress null values, Show all values and suppress zero values.

and its showing only odd numbers.

=Round((sum({< Datums=,WEEK1= {">=$(=MAX(WEEK1)-11)"}>} $(sumkm) )/sum({<Datums=,WEEK1= {">=$(=MAX(WEEK1)-11)"}>} [Kms Travelled])*1000))

ssss.PNG

after click on the Clear  its showing last 12 weeks

sasasa.PNG

Thanks for your support.

1 Solution

Accepted Solutions
bc-thebruuu
Creator
Creator

Take a look @ my solution.

Show all values + one expression (hidden) =1

You just need to modify it in order to get 1 for last 12 months

View solution in original post

9 Replies
bc-thebruuu
Creator
Creator

Can you post your application?

Can you show us the selected fields?

rkpatelqlikview
Creator III
Creator III
Author

Thanks for your response Bruno,

Please find the attached.

bc-thebruuu
Creator
Creator

Take a look @ my solution.

Show all values + one expression (hidden) =1

You just need to modify it in order to get 1 for last 12 months

rkpatelqlikview
Creator III
Creator III
Author

Thanks Bruno, But here its showing all the weeks. It should show only 12 weeks. Just entered the vehiclenumber "MH46F4529". It should show only last 12 weeks. If there is no data then with empty space.

12weeks.PNG

bc-thebruuu
Creator
Creator

As I told ...the expression =1

should be if date in the last 12 month  then 1

rkpatelqlikview
Creator III
Creator III
Author

Agreed Bruno, Many thanks for your help.

Just i asked can we hide the remaining weeks also.

weeks.PNG

bc-thebruuu
Creator
Creator

I'll send you the qvw

Last thing to do was to add alternate state ...

in this way the dimension line (independent from selection remains the same wahtever the selection you do on the alternate state)

BUT formulas are dependent on alternate state

rkpatelqlikview
Creator III
Creator III
Author

Thanks Bruno.

rkpatelqlikview
Creator III
Creator III
Author

Excellent Bruno, Its working now. Many thanks for your great support