Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
Please help me out as i am stuck in a problem.
I am trying to implement a functionality in Self service BI, like i have an expression for sales Sum(Sales) ,
Based on the dimensions i have Date Month and Year's Dimension
I want if i select Sales from Metric and Month from Dimension then its Return only last date record like 16th Feb,2017 Sales.
And when i select Date Dimension its show me date wise sales like 1,2,3,....16th Sales.
Awaiting your reply .
Regards
Hi,
Have you used the max function any where?
Also you can try this.
Sum(Aggr(Sum(Sales),Date))
Regards,
Kaushik Solanki
Thanks for your reply.
I am using this expression
Variable : Maxdate=max(Date)
Expression =sum(if(Date=MaxDate,Sales)).
But it do not return me the breakup of dates when i select Date from Dimension.
Change your expression to identify what has been selected
=if(Dimension=Date , Sum(Sales) , if(Dimension = Month , Sum(Date = {"$(vMaxDate)"} Sales) ))
Hi,
It is because the variable is set before chart starts calculating, it is not possible to have a different value of Max for each dimension.
What method are you using to change the dimension in chart?
Regards,
Kaushik Solanki
Please suggest any alternative as if i select Month its return max date else date wise breakup
Or you can Try this
If(GetselectedCount(Month)>0, Sum({<Date={ "$(=max(Date) )"}Sales), sum(Sales))