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

[ASK] Growth YTD with Year dimension

Dear Qlik Master,

I have a requirement that have to show Growth trend by Year.

That have formula : [YTD Sales]-[Prev YTD Sales]

I've created an expression that show correct result in summary chart like Speedo.

But when i want to add Year Dimension, it shows different result.

My result is like below :

Capture.PNG

with Curr Sales expression :

sum(

{<

  FLAG_TRANS={'Item_Sales_Detail'},

  Year={'$(=max(Year))'},

  MonthDay={'<=$(=max( {<FLAG_TRANS={'Item_Sales_Detail'},Year={'$(=max(Year))'}>} MonthDay))'},

  Quarter=,Month=,Week=,Day=

>}

ITEMBASEAMOUNT)

and Prev Sales expression :

sum(

{<

  FLAG_TRANS={'Item_Sales_Detail'},

  Year={'$(=max(Year)-1)'},

  MonthDay={'<=$(=max( {<FLAG_TRANS={'Item_Sales_Detail'},Year={'$(=max(Year))'}>} MonthDay))'},

  Quarter=,Month=,Week=,Day=

>}

ITEMBASEAMOUNT)

And the result that user expected is :

Capture.PNG

What's wrong with my expression?

Please help.

Thank you,

Best Regards

0 Replies