Forum Discussion
Anonymous
5 years agoNot applicable
KPI Target YTD with Live Dataset
Hi, I'm trying to format some KPIs, I have a monthly goal of '22' and it is fixed at 22 per month for the year. How do I write the DAX for YTD goal whereby my report shows the previous months goa...
- 5 years ago
Hi Anonymous
Well, your question is not clear, but if you want to calculate the KPI based on the Today Date, you can use the below code:
KPI= VAR _Month_Goal = 22 // Monthly Goal RETURN VAR _Date = TODAY () // you can change this to any date RETURN VAR _MonthP = MONTH ( _Date ) // this Var shows the month of the _Date RETURN ( _MonthP - 1 ) * _Month_GoalDid I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Anonymous
5 years agoNot applicable