Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 goal within the KPI? I.e. When it turns february, it shows as 22, March is 44, April 66 etc..
I created a new measure simply as 'Prop = 22' so that if the target changes next year I can rename the variable to say 'Prop = 24' and the YTD will change with it.
Having trouble as I am new to Power BI and using a live dataset, thanks!
Solved! Go to Solution.
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_Goal
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
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_Goal
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |