Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kailashkotak91
Contributor III
Contributor III

Getting difference between current month and previous month in straight table

Hi Qlik Experts,

I need the difference between the count of EP for march 2018 and feb 2018. The month field is already coming from my database. how can i write an expression in the straight table to achieve this ?

 

Thanks in advance

 

2 Replies
y_grynechko
Creator III
Creator III

Hey,

it depends how you get the data. Do you get some additional data fields from which Month is being generated? Or you just have plain text months provided in one column? 

 

Shubham_Deshmukh
Specialist
Specialist

In your data,  you have direct months only  in DB OR you are generating month from date field.

1.  If you have direct month data and if sequence is proper, then use this : 

=If(RowNo() = 1, 0,[EP Scanned]  - Above([EP Scanned]]))

2. If you have date field in data then extract that field and use this: 

=sum(if(dates>=MonthStart(today()) and dates <=MonthEnd(today()),[EP Scanned]  ))
-
sum(if(dates>=MonthStart(Addmonths(today(),-1)) and dates <=MonthEnd(Addmonths(today(),-1)),[EP Scanned]  ))

 

Regards

Shubham