Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

Before and After Realease Date Sale

Hello, I have the phone sales tables below, I am trying to plot the Before and after release date Sales$ and Counts. The idea is to see how many/much phones we sold on preorder before it was releases and how many/much after the release date

what is the best visual chart to  plot this requirement and any suggestion with the sample below will be appreciated.

TableA

   

typesaledateqtyamount
x115/03/2017550000
x116/03/201710100000
x117/03/20173030000
x118/03/201712120000
x119/03/201755000
x120/03/201755000
x121/03/201788000
x215/03/20172323000
x216/03/20173232000
x217/03/20174040000
x218/03/20172020000
x219/03/20179090000
x220/03/20177070000
x221/03/20177070000
x315/03/201755000
x316/03/20171010000
x317/03/20171212000
x318/03/20175050000
x319/03/20178080000
x320/03/2017100100000
x321/03/2017150150000

TableB

  

Typereleasedate
x119/03/2017
x215/03/2017
x318/03/2017

I have attached the excel file as well.

Thanks

7 Replies
PrashantSangle

for compare you can use bar chart

you can do it many ways

one of possible way is

Load * from 1st_table:

Left Join

Load * from 2nd_table

then in front end

take bar chart > take type as dimension

and expression >

1:Before: sum(if(sales_date<release_date,qty))

2:After: sum(if(sales_date>release_date,qty))

3:OnReleasedate sum(if(sales_date=release_date,qty))


Note : you can move expression logic in script also.


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks  Prashant, you idea will work as a stacked bar chat But am looking for something visually strong though like a bubble chart with a reference line (release date) and Before and after on each side with the

bubble size the count.

I will see what others think before I settle for the bar chart.

Kushal_Chawda

I don't think bubble chart will be suitable here, if it is you can draw the representation you need, we will try to do it

Data:

LOAD type as Type,

    saledate,

    qty,

    amount

FROM

[phones test.xlsx]

(ooxml, embedded labels, table is Sheet1);

Left Join(Data)

LOAD

    Type,

    releasedate

FROM

[phones test.xlsx]

(ooxml, embedded labels, table is Sheet1);

New:

NoConcatenate

LOAD *,

    if(saledate<releasedate,'Pre Launch','After Launch') as Launch_Flag

Resident Data;

DROP Table Data;

Capture.JPG

PrashantSangle

Well you can show it 3 different bar.

Or

You can use gauge chart also. crate 2 different gauge for each expression.

see qlik demos for more ideas.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Kushal_Chawda

or will this work for you?

Capture.JPG

didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks Kushal, I will play further with the bubble and the gauge chart.

effinty2112
Master
Master

Hi Didier,

Maybe:

Release:

Mapping

LOAD

     Type,

     releasedate

FROM

[phones test.xlsx]

(ooxml, embedded labels, table is Sheet1) Where Len(Trim(releasedate)) > 0;

Sales:

LOAD

type,

     saledate,

     ApplyMap('Release',type) as releasedate,

     saledate - ApplyMap('Release',type) as DaysSinceRelease,

     qty,

     amount

FROM

[phones test.xlsx]

(ooxml, embedded labels, table is Sheet1);

Then:

1.png

Trellis Line chart with dimensions type and DaysSinceRelease.

Expression:

Rangesum(Above(sum(qty),0,RowNo()))

with Background colour =if(DaysSinceRelease <0,LightRed())

Plateau line style.

Cheers

Andrew