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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SACooper
Helper II
Helper II

Performance Against Target Measure giving weird results within Matrix

SACooper_0-1661427107185.png

 

The measure is as follows:

 

VAR _daysInView = COUNTROWS(VALUES(CIVICA_CompletedItems[ProcessedDate]))
VAR _numberOfStaff = COUNTROWS(VALUES(CIVICA_CompletedItems[ProcessedBy]))
--
VAR _flexitime = SUM('flexi UD_FullReport'[Day_TotalTime])
VAR _decimalHours = _flexitime / 60
VAR _dayValue = TIME(7,15,0) * 24
VAR _targetPerHour = _dayValue / 43
VAR _Target = ROUNDDOWN(_decimalHours / _targetPerHour,0)

VAR _performanceAgainstTargetPercentage = COUNT(CIVICA_CompletedItems[WorkType]) / _Target
VAR _performance = _performanceAgainstTargetPercentage - 1
RETURN

_performance
 
If I return _performanceAgainstTargetPercentage I get the correct percentages, its just when I take them away from 1 I then get the results displayed in the image above.

 

1 ACCEPTED SOLUTION

Hi @SACooper

What i mean is for example

KP = (1908-1685)/1685

LW = (494-820)/820

MW = (1090-1572)/1572

This should give the value I assume you are looking for.

Greetings,

Luuk

View solution in original post

6 REPLIES 6
SACooper
Helper II
Helper II

<insert favoured expletive here> thank you for pointing this out, basic math that I should have be well adept at, tunnel vision, is the only excuse I can come up with.

 

This works perfectly ... still confused why my previous math didn't work out but this did the trick 

 

Thank you!

Luuky
Helper I
Helper I

Hi @SACooper,

Its indeed pretty wierd that is does this. So if I understand correctly the output is not 0 without the -1?

If that is the case can you show the output % that is shown. 

What you can also try is add a measure with value 1 and change the type to %, then make another measure that substracts the newly made measure from _performanceAgainstTargetPercentage and look at all the values in a table and check what it does. 

This is what it does for me:

Luuky_0-1661433457198.png

 

Greetings, 

Luuk

 

SACooper_0-1661433900450.png

SACooper_0-1661434949108.png

 

 

This is what is happens when I return _performanceAgainstTargetPercentage. So as you can see I was expecting figures such as  102.86% (1.02), -24.12% (-0.24) etc. after subtracting 1

 

** Please ignore the infinity references there are to be expected as the underlying data for that time period has yet to be captured..

Hi @SACooper,

What you can do is instead of doing -1 you can do - _target. In this scenario 100% = the target. Also use Divide() to divide. Hope this helps!

Greetings, 

Luuk

Hi @Luuky 

 

in this case _Target is not 100% its a calculated numerical value. From the example above for week 25/07/2022

 

KP = 1908 / 1685

LW = 494 / 820

MW = 1090 / 1572

 

so if I take _Target away I get an extremly large number.

 

Thank you for the DIVIDE function reminder i've replaced that element.

Hi @SACooper

What i mean is for example

KP = (1908-1685)/1685

LW = (494-820)/820

MW = (1090-1572)/1572

This should give the value I assume you are looking for.

Greetings,

Luuk

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.