Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am three expression say:
RollingMonth as a dimension
PreviousMonth_CurrentYear =sum({<RollingMonth={'$(=VPM)'}>} SalesAmount)
CurrentMonth_CurrentYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)
CurrentMonth_PreviousYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)
where as variable are
VPM= =MonthName(AddMonths(max(SalesDate),-1))
VCM= =MonthName(max(SalesDate))
VCMLY= MonthName(AddMonths(max(SalesDate),-12))
Can I merge these 3 expression into 1 expression by using Pick,Match,WildMatch function etc.
Regards,
Balraj
Hi Balraj
I dont know if my solution is the most elligant but it works.
look in qvw to maybe find som inspiration
/Teis !
See if this expression helps:
=Sum({<RollingMonth={'$(=VPM)', '$(=VCM)', '$(=VCMLY)'}, Month = , Year = >} Sales)
Output With no selection:
With Year and Month Selection:
Is this close to what you want?
Hey Balraj,
Is this still not what you are looking for? If not can you explain what exactly are you looking to do?
I tried with bypassing the things like you shared. But did not work.
Let me try again
Simple words,
I want CM Vs PM vs CMLY in single expression like IN statement in SQL
and it should work on all the selections
In three different columns? or three different rows comparison?
Right now I see three different row comparison between the three dates?
Got it. I was missing to bypass SalesMonth.
Let me implement in live enviornment.
Awesome
Let us know if you continue to have trouble.
Best,
Sunny