Have a raw based table with target values for each month. Each raw has a link date for the first date of month.
My KPI should calculated for previous day of month and compared with target value.
At the moment indicator showing only target value for one first day of month.
Any ideas how to deal with a trouble?
Solved! Go to Solution.
With only the formula of this meaasure and not knowing what each value represents I can't do a lot but I notice that in the IF you do a Count of the DATE why are you using a count and not the actual date itself?
Can you share some sample file to test?
In addition, you can also try to use belwo formula if it suitable for your requirement:
Measure: Calculate the previous month average as target and show it at the first date of each month.
Target= var currDate=Max(D_Date[DATE_Date]) var minDate=MINX(Filter(ALL(F_Invoice),Month(F_Invoice[Date])=Month(CurrDate)&&F_Invoice[Date]<=CurrDate),[Date]) var perviousTarget=AVERAGEX(Filter(ALL(F_Inventory),[Date]>=Date(Year(currDate),Month(currDate)-1,1)&&[Date]<=Date(Year(currDate),Month(currDate),1-1)),[M2]) return IF(MAX(F_Invoice[Date])=minDate,perviousTarget,blank())
Targets comes from SQL table as is.
One month = one raw devided by columns with different goals values.
Link date field looks like dd-mm-yyyy where day always equal to firtst day of the month.
My KPI is calsulated per day of month.
It mean I need some how to say that IF KPI is calculated for current date, the target value should be picked up for the first date of month or just like a sum for current month (because only one target record exist).