Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Difference bar (By week) - Qlik sense

Hiya

I have a bar chart

this shows Customer_ID totals for each week. 05/01/2015, 12/01/2015  column labelled =  Week_Beginning

I need an expression that will show the difference between the two weeks

Like

count({$< Department = {"Catering"},  Week_Beginning - Date(Week)  >}Customer_ID)

e.g

05/01/2015 total was 30

12/01/2015 total was 35  ...so customer difference bar will show the total difference of 5

please help

1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi Joanna

I've faced the same problem few days ago

I was needed to calculate the difference between sales from a week with the week before. It's seems that it is what you are looking for.

below the way you may test It :

count({$< Department = {"Catering"}>}Customer_ID)

-

rangesum(above(count({$< Department = {"Catering"}>}Customer_ID)),1,1))

For my need I was able with this kind of formula to have this :

bar chart :

take Week Or Week_Beginning as dimension and the formula above as mesure.

here the same as a table :

hope this will help you

Regards

Bruno

View solution in original post

2 Replies
brunobertels
Master
Master

Hi Joanna

I've faced the same problem few days ago

I was needed to calculate the difference between sales from a week with the week before. It's seems that it is what you are looking for.

below the way you may test It :

count({$< Department = {"Catering"}>}Customer_ID)

-

rangesum(above(count({$< Department = {"Catering"}>}Customer_ID)),1,1))

For my need I was able with this kind of formula to have this :

bar chart :

take Week Or Week_Beginning as dimension and the formula above as mesure.

here the same as a table :

hope this will help you

Regards

Bruno

joeybird
Creator III
Creator III
Author

Hiya

this works great thank you however, the subtraction is showing on the wrong week bar week beginning date, its showing the correct figure, but on the week before

Dimension Week_Beginning

e.g difference of 5 is showing on 05/10/2015, where it should be showing on 12/10/2015

if you can help, please do but not to worry as chart looks ok

Kind Regards