Forum Discussion

PowerBiNoob37's avatar
4 years ago
Solved

Count Values from one table using based on month and year and add to another table (Pbix included)

Hi,   I have a bit of incident data coming from a sharepoint list, every row contains a date of incident and incident type which is a choice field.   Here is a sample of my data     ...
  • HotChilli's avatar
    4 years ago

    Power Query:

    Add a column for 1st day of the month (can do this from the interface->Select date column, go to Add Column-> From Date and Time on the ribbon)

    Remove the original date column.

    Group By StartOfMonth and Incident using Count Rows as aggregation.

    This gives a 3 column table which is pretty good for storage and analysis.

    If you want a table as shown, then Pivot the IncidentType column