Forum Discussion

dogt1225's avatar
dogt1225
Icon for Helper III rankHelper III
6 years ago
Solved

Week Ending Average Age of Open Requests

Hi All,  I am looking to create a bar chart on PowerBI that shows the Week Ending Average Age of Open Requests.   For my company the Fiscal week begins on a Saturday and End on a Friday. Also th...
  • Greg_Deckler's avatar
    Greg_Deckler
    6 years ago

    dogt1225 OK, if you have a Week Ending, then you should be able to use the built-in Running Total Quick Measure potentially. Otherwise, potentially:

    Cumulative Measure = 
      VAR __Current = MAX([Week Ending])
    RETURN
      SUMX(FILTER(ALL('Table'),[Week Ending]<__Current),[Measure])

    [Measure] should be whatever you are doing now to calculate it non-cumulatively. Mileage may vary. You may need an ADDCOLUMNS wrapping your FILTER or even a SUMMARIZE. But I think if you use this for your measure:

    DATEDIFF(MAX(DataTable[Submitted_Date]), TODAY(), DAY)

    If you can post your sample data with the Week Ending you calculated I can try to mock it up and test it and be specific.