Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

values getting changed

Hi All,

I have 2 expression  in the attached.

PFA

My question is when I select Months my 2 expression "Growth" values changed.

Thanks

12 Replies
MK_QSL
MVP
MVP

May be try this

Growth

=(( (SUM({<MONTH=>}  [Gross Sales Amount]) - SUM({<MONTH=>}   [Sales Return Amount]) )

-above((SUM( {<MONTH=>} [Gross Sales Amount]) - SUM( {<MONTH=>} [Sales Return Amount]) )

,12))/above((SUM( {<MONTH=>} [Gross Sales Amount]) - SUM({<MONTH=>}   [Sales Return Amount]) ),12)) * 100

sunny_talwar

And may be this to the other expression:

YTD Sale

(Sum({<Yea r=, Quarter =, Month =, FiscalYear = {">$(vFY)"}, [Posting Date] = {">=$(=QuarterStart(Min({<Month =>}[Posting Date]),4))<=$(=MonthStart(Today())))"}>} [Gross Sales Amount]) -Sum({<Year =, Quarter =, Month =,  FiscalYear={">$(vFY)"},[Posting Date]={">=$(=QuarterStart(Min({<Month =>}[Posting Date]),4 ))<=$(=MonthStart(Today())))"}>} [Sales Return Amount]))/100000

prma7799
Master III
Master III
Author

I tried but values are wrong

sunny_talwar

Can you elaborate on what do you mean when you say values are wrong?

prma7799
Master III
Master III
Author

Hi Sunny,

When I applied above solution then my growth values  are shoving me wrong.

Thanks

sunny_talwar

I hope you have replaced MONTH with your MonthField (Whatever its called) and then tried it? I see no reason why your expression which worked earlier won't work now. Because all Manish prescribed is to help your expression not change based on any selection made in the MonthField.

Would you be able to share a sample if you are still not able to figure it out?

prma7799
Master III
Master III
Author

PFA

MK_QSL
MVP
MVP

Where is vFY in your variable definition?

prma7799
Master III
Master III
Author

vFY =Year(addyears(max(Date),-4))