Forum Discussion

Viper1o34's avatar
Viper1o34
Regular Visitor
9 years ago
Solved

Dates improperly aggregating in visualization

Community,   I have a very simple question.  So simple in fact that I cannot for the life of me find an answer on this forum or on youtube.   I am attempting to show a bar graph where I am counting...
  • dkay84_PowerBI's avatar
    dkay84_PowerBI
    9 years ago

    A few things you need to fix.

     

    1.  My example of using a number (1-12) was an example if you have a Month column.  Since you are using Month and Year, you need to make a unique order column for this value.  I would make a calc column (query editor) that takes Year*100+Month.  This will give you values like 201601 for Jan2016, 201602 for Feb2016 etc.  Make sure the data type is numeric and this will allow you to sort correctly across multiple years.

     

    2.  You don't need to concantenate this unique sort order column with the Month Year column.  Just select the field from the fields list, go to the Modeling tab, and choose Sort By > Unique Sort Order column.