Forum Discussion

Brian-Cash's avatar
Brian-Cash
Frequent Visitor
3 years ago

KPI Error: YTD vs STLY difference not calculating properly

Hi all,

 

I have a dashboard whereby I'm tracking overtime.

Each date overtime occurs its tracked on an excel with a relelvent cost.

 

I'm trying to setup a KPI visual to show a YOTD trend to compare with the same time last year. I have a correct measure created for the percentage difference between the two but when I set the relevant measure along with date on the KPI card I get the below error. I have tested the YOTD, LY and percentage difference measure by just adding them to a card visual on their own and the correct numbers are showing. Am I missing something?

 

 

Measures:

 

Last year overtime

OTCOSTLY = CALCULATE([OTCOSTYTD],SAMEPERIODLASTYEAR('Query1'[OT DATE]))
 
Year to date
OTCOSTLY = CALCULATE([OTCOSTYTD],SAMEPERIODLASTYEAR('Query1'[OT DATE]))
 
Year on Year differnce in %
OTYOY = [OTCOSTYTD]-[OTCOSTLY]
OTYOY% change = DIVIDE([OTYOY],[OTCOSTLY])

2 Replies

  • Brian-Cash's avatar
    Brian-Cash
    Frequent Visitor

    There is definelty something wrong with how the dates are working. For clarity on the excel Im drawing from entries are sporiically entered by date. Is the error is how I'm summing up each year? I would really appreciate some guidance with this one