Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
First Problem:
I need to add all values in my [Total Leads] field that fall within the month of the last date given. The max([Date]) will change based on restrictions applied in the load script. I started with If() statements, but they are not as flexible and do not allow a max() aggregation.
What I need, then, is something similar to one of these functions:
Sum({$<Month([Date])={"$(=Month(Max([Date])))"}>}[Total Leads])
Sum({$<[Date]={"$(>=MonthStart(Max([Date])))"}>*$<Date={"$(<=MonthEnd(Max([Date])))"}>}[Total Leads])
Second Problem:
I need to restrict the dimension of a graph in a similar manner. The dimension would be [Date.autoCalendar.Date], but I only want it to show dates for the month of the last date available (max([Date])). Again, I started with If(), but this does not allow the max(). Any work-arounds?
As always, thank you for the help.
Aaron
Try this may be -
Sum({$<[Date]={">=$(=MonthStart(Max([Date])))<=$(=MonthEnd(Max([Date])))"}>}[Total Leads])
Try this may be -
Sum({$<[Date]={">=$(=MonthStart(Max([Date])))<=$(=MonthEnd(Max([Date])))"}>}[Total Leads])
Thanks! That solves the first problem. Any ideas on the second?
I think by deselecting zero values from Add-on check box or removing nulls from dimension properties it should only show values for filtered dates in measure. Can you check this out.
Wow, that was a lot easier than I was making it! Thanks a bunch!