Forum Discussion

eszimmerman's avatar
eszimmerman
Regular Visitor
5 years ago

Measures - Leading Indicators & Future Forecasting

I'm working on getting printer metrics for my company's network fleet and I've run into a bit of a snag.
 
I can get trailing indicators just fine, but can't seem to get leading going. The metrics are recorded every 30 minutes until they get stored as a historical metric on the 20th of every month.
 
Here's the measure I'm using:
 
  1. B&W MTD =
  2. VAR __PREVIOUSMONTH =
  3. (TOTALMTD
  4. (
  5. SUM('printerMeterHistory'[B&W]),
  6. DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], -1, MONTH)))
  7. VAR __CURRENTMONTH =
  8. (TOTALMTD
  9. (
  10. SUM('printerMeterHistory'[B&W]),
  11. DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], 0, MONTH)))
  12. VAR __NOW =
  13. (TOTALMTD
  14. (
  15. SUM('printerMeterHistory'[B&W]),
  16. DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], 0, DAY)))
  17. VAR __DIFFERENCE =
  18. IF((__CURRENTMONTH - __PREVIOUSMONTH >= 0), __CURRENTMONTH - __PREVIOUSMONTH, __CURRENTMONTH)
  19. RETURN __DIFFERENCE

2 Replies

  • eszimmerman's avatar
    eszimmerman
    Regular Visitor

    I've got it down a bit further... any asistance appreciated.  Thanks!

    1. B&W MTD =
    2. VAR __PREVIOUSMONTH =
    3. (TOTALMTD ( SUM('printerMeterHistory'[B&W]), DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], -1, MONTH)))
    4. VAR __CURRENTMONTH =
    5. (TOTALMTD ( CALCULATE( (MAX('printerMeterHistory'[pmh_detailedMeterReadDate], DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], 0, DAY) ) )
    6. VAR __TOTAL = IF((__CURRENTMONTH - __PREVIOUSMONTH >= 0), __CURRENTMONTH - __PREVIOUSMONTH, __CURRENTMONTH)
    7. RETURN __TOTAL
    • eszimmerman's avatar
      eszimmerman
      Regular Visitor

      Getting there...

       

      B&W MTD =
      VAR __PREVIOUSMONTH =
      (TOTALMTD ( SUM('printerMeterHistory'[B&W]), DATEADD('printerMeterHistory'[pmh_detailedMeterReadDate].[Date], -1, MONTH)))
      VAR __CURRENTMONTH =
      (TOTALMTD ( CALCULATE( (MAX( printerMeterHistory[pmh_detailedMeterReadDate].[Date] ) ) )
      VAR __TOTAL = IF((__CURRENTMONTH - __PREVIOUSMONTH >= 0), __CURRENTMONTH - __PREVIOUSMONTH, __CURRENTMONTH))