Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikSense - Difference in Values on Bar Chart for Current Month and Previous Month

Hi All,

I have below query regarding bar chart and value calculation.

I have loaded the data to QlikSense . My data is in below format

   

ProductDateValueExpected Result - Difference between Value of this Month end date and Previous Month end date
A31-Jul-17200100
A30-Jun-1710020
A31-May-1780
B31-Jul-17500300
B30-Jun-17200
C31-Jul-17100-200
C30-Jun-17300

I want to show the Resultant value i.e. the difference between current and previous month value on the BAR CHART. Additionally, my date column is in format dd-mmm-yy.

I was able to create the bar chart but unable to find out how to create a column for difference of month end values and showing them on bar chart when those two months are selected on QlikSense.

Also please help me out with showing the date as below

  

Current formatExpected
31-Jul-17Jul-17
30-Jun-17Jun-17
31-May-16May-16
31-Jan-16

Jan-16

Thanks in advance

5 Replies
antoniotiman
Master III
Master III

Hi,

See Attachment.

Regards,

Antonio

Not applicable
Author

Hi Antonio,

I am unable to open the attachment in QlikSense. I am using QlikSense Desktop, may be this file isnt compatible. Can you please paste it here , or send me a file compatible with QlikSense Desktop.

Thanks

antoniotiman
Master III
Master III

I'm sorry,

See new Attachment.

Not applicable
Author

I am sorry, but I am still not able to open using QlikSense. Getting error as "Bad command line arguments"

Can you please paste the screenshot or the code here.Thanks

antoniotiman
Master III
Master III

Script

SET DateFormat='DD-MMM-YYYY';

LOAD *,MonthName(Date) as MonthName Inline [

Product, Date, Value

A, 31-Jul-17, 200 

A, 30-Jun-17, 100

A, 31-May-17, 80

B, 31-Jul-17, 500

B, 30-Jun-17, 200

C, 31-Jul-17, 100

C, 30-Jun-17, 300 ];