Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I have data with month wise sales and i want to show last 3 months sales based on max date of each month in bar chart.
When i select April,it will show April,March,February & If select March,it will show March,February. I am attached a source file.
Please give a solution to this task.
Thanks in advanced,
Suman.
Maybe with expression
Sum({< Date = {"$(='>=' & MonthStart(AddMonths(Max(Date), -3)) & '<=' & MonthEnd(Max(Date)) )"} >}Sales)
Hi, you can just write :
Sum({< Date = {"$(='>=' & MonthStart(Max(Date), -3) & '<=' & MonthEnd(Max(Date)) )"} >}Sales)
Hello Andrey,
Your expression is correct But it will shows wrong percentage in my task.
Can you provide more details? What is the expression you are using?
Hai Andrey,
Iam using below expression
= round(Count({$<Month=, Year=, Date = {"$(='>=' & MonthStart(AddMonths(Max(Date), -3)) & '<=' & MonthEnd(Max(Date)) )"},[Difference Category]={'7Days'}>} DISTINCT Sales)/
Count(DISTINCT {$<Month=, Year=, Date = {"$(='>=' & MonthStart(AddMonths(Max(Date), -3)) & '<=' & MonthEnd(Max(Date)) )"}Sales) *100,0.01,0)
Strangely enough, but I do not see anything that could give the wrong result. Can you share a sample?