Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Franco2
Contributor II
Contributor II

Changing dates format in Set analysis

Hi!

I have a dataset that looks like this

Order OrderMonth DeliveryMonth Amount
1 201901 201901 10
2 201901 201902 20
3 201901 201901 10
4 201901 201901 40
5 201901 201903 20
6 201902 201904 20
7 201902 201902 10
8 201902 201903 30
9 201903 201905 40
10 201903 201904 10
11 201904 201903 50
12 201905 201903 20
13 201906 201907 50
14 201906 201908 20

 

If i want to do a chart showing the amount of orders that were delivered the same month they were ordered i will have to put something like this:

Sum(If(OrderMonth=DeliveryMonth, Amount))

But now I have two questions:

-I want to show the sum of amounts from orders that were delivered until 1 month after. I think it should be something like 

Sum(If(OrderMonth<=DeliveryMonth-1, Amount))

-And if I find that the second question is how to change the format of the months. As you can see the 4 first digits refer to the year and the 2 last refer to the month. If I do the previous calculus it will omit the orders from december 2019 that were delivered in January 2020. I think there's a way to do it by creating a new field but I wonder if theres a way to do it directly in set analysis.

I will really appreciate your answers so much. Sorry I'm new to Qlik and I'm also not native speaker.

 

 

0 Replies