Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
CarlBlunck
Resolver I
Resolver I

KPI Target

Hi all,

 

I am using the KPI visual for the 1st time and I am wanting to add a calculated target, but I can't get it to work.

 

My dataset has a column that contains values (TimeToFill) like so (data not real):

DateMonthYearTimeToFill
1/01/2022Jan 202225.02
02/02/2022Jan 202228.32
01/03/2022Mar 202231.89
20/05/2022May 202218.29

 

The Value in the KPI visual is an average of the TimeToFill values.  With the Trend Axis being the MonthYear.

 

For the Target value, I have written the following expression:

 

 

TimeToFill-Target = 
VAR StartDate = EOMONTH(TODAY(),-14)+1
VAR EndDate = EOMONTH(TODAY(),-1)
VAR Result =
Calculate(
    AVERAGE(fact_PageUpReqData[TimeToFill-OfferAccepted]),
    DATESBETWEEN( fact_PageUpReqData[dim_FirstOfferAccepted.FirstOfferAccepted], StartDate, EndDate )
)
RETURN
Result

 

But this is giving me the same result as the KPI card.

 

What I am wanting the target to show, is the average TimeToFill over the last 13 months.  Not what it was for the last month as it is currently.

 

CarlBlunck_0-1666749483102.png

 

How do I achieve this?

 

Thanks

Carl

1 ACCEPTED SOLUTION
CarlBlunck
Resolver I
Resolver I

Solved it 🙂 needed to all the ALL function in.

TimeToFill-Target = 
VAR StartDate = EOMONTH(TODAY(),-14)+1
VAR EndDate = EOMONTH(TODAY(),-1)
VAR Result =
Calculate(
    AVERAGE(fact_PageUpReqData[TimeToFill-OfferAccepted]),
    DATESBETWEEN( fact_PageUpReqData[dim_FirstOfferAccepted.FirstOfferAccepted], StartDate, EndDate ),
    ALL(fact_PageUpReqData)
)
RETURN
Result



View solution in original post

1 REPLY 1
CarlBlunck
Resolver I
Resolver I

Solved it 🙂 needed to all the ALL function in.

TimeToFill-Target = 
VAR StartDate = EOMONTH(TODAY(),-14)+1
VAR EndDate = EOMONTH(TODAY(),-1)
VAR Result =
Calculate(
    AVERAGE(fact_PageUpReqData[TimeToFill-OfferAccepted]),
    DATESBETWEEN( fact_PageUpReqData[dim_FirstOfferAccepted.FirstOfferAccepted], StartDate, EndDate ),
    ALL(fact_PageUpReqData)
)
RETURN
Result



Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.