Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
PaulWilson
Contributor
Contributor

Trying to show month on month change

PaulWilson_0-1666780675019.png

Hi, I'm new to Qlik Sense and I'm trying to find the right logic to do this. In our reporting we take a snapshot of currency positions at month end, I would like to find a way to compare this month end's rate with the previous one to determine the percentage change for use in a heatmap. Any advice on how best to do this?

Labels (3)
1 Solution

Accepted Solutions
brunobertels
Master
Master

hi 

here a simple approach 

table:
load * inline [
MonthEnd,FromCurrency,ToCurrency,avgRate
31/01/2022,AUD,CAD,0.88504025
28/02/2022,AUD,CAD,0.88814245
31/01/2022,AUD,CHF,0.66034821
28/02/2022,AUD,CHF,0.66167182
] (delimiter is ',') ;

NoConcatenate
final:
Load
*,

if(previous(ToCurrency)=ToCurrency ,
1 - previous(avgRate)/avgRate ) as %evol

resident table order by ToCurrency,MonthEnd;
drop table table;

table :

brunobertels_0-1666795929994.png

 

View solution in original post

2 Replies
brunobertels
Master
Master

hi 

here a simple approach 

table:
load * inline [
MonthEnd,FromCurrency,ToCurrency,avgRate
31/01/2022,AUD,CAD,0.88504025
28/02/2022,AUD,CAD,0.88814245
31/01/2022,AUD,CHF,0.66034821
28/02/2022,AUD,CHF,0.66167182
] (delimiter is ',') ;

NoConcatenate
final:
Load
*,

if(previous(ToCurrency)=ToCurrency ,
1 - previous(avgRate)/avgRate ) as %evol

resident table order by ToCurrency,MonthEnd;
drop table table;

table :

brunobertels_0-1666795929994.png

 

PaulWilson
Contributor
Contributor
Author

Thanks, that seems to have worked!