Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Running Total - Count Groups with Missing Values

I'm trying to create a running total for the number of open data sets our department has published by month, so that we can see how many data sets each division has published through any given month....
  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Firstly, create a date table in Power BI Desktop following the guide in this blog.

    Secondly, create relationship using date field of the date table and pub_date field of Open Data table.

    Thirdly, create measure using DAX below.

    Running OD = CALCULATE(COUNT('Open Data'[ds_name]),FILTER(ALL('Date'),'Date'[DateKey]<=MAX('Date'[DateKey])))


    At last, drag date field of date table to X-Axis of your chart.


    Regards,
    Lydia