Forum Discussion

TJM_UK's avatar
TJM_UK
Regular Visitor
5 years ago
Solved

How Do You Count Rows of YYYY-MM and Present As A Bar Chart In YYYY-MM Time Series Order

I started with Power BI Desktop yesterday and even after reading many forum posts and trying to use Measures I cannot seem to achieve what I beleive is fairly simple.   From the example table below...
  • PhilipTreacy's avatar
    5 years ago

    Hi TJM_UK 

    Download updated PBIX file

    ah ok you're using Direct Query.  OK a different approach.  Create a table from the data you get from Azure.  Click New Table in the Ribbon then use this code

    Year_Month = SELECTCOLUMNS('Table', "YearMonth", FORMAT([CreatedDate], "yyyy-mm"), "Name", [Name])

    Creates this

    Then use that table to create the visual

    Regards

    Phil