Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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 !!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
10 | |
9 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
12 | |
11 | |
10 |