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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Please help me in getting variance

Hi

I have attached sample data

please help with expression

    

Etiquetas de columna
Valores2017/022018/02YoY
Suma de Sales82381627997.6%
Suma de Income565101579.6%
Suma de expenses4511003122.4%
1 Solution

Accepted Solutions
qlikviewwizard
Master II
Master II

Expressions:

sum({<Date={"$(=date(addmonths(date(max(Date),'YYYY/MM'),-12),'YYYY/MM'))"}>}Data)

Sum( {$<Date={"$(=Date(Max(Date),'YYYY/MM'))"}>} Data )

View solution in original post

2 Replies
qlikviewwizard
Master II
Master II

Hi,

You can achieve like this.

Data:

CrossTable(Dimension, Data, 2)

LOAD Date#(date,'YYYY/MM') as Date,

    product,

    Sales,

    Income,

    expenses

FROM

(ooxml, embedded labels, table is Hoja1);

Capture.JPG

qlikviewwizard
Master II
Master II

Expressions:

sum({<Date={"$(=date(addmonths(date(max(Date),'YYYY/MM'),-12),'YYYY/MM'))"}>}Data)

Sum( {$<Date={"$(=Date(Max(Date),'YYYY/MM'))"}>} Data )