Forum Discussion

grasa's avatar
grasa
Helper I
2 years ago
Solved

Problem with Month-Year view

Dear all, I have a column formatted as date (called "_Vorauss. Baubeginn"). It includes data with day, month and year. Now I would like to get the data aggregated to just month/year to use that in ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi grasa 

     

    Thanks for the reply from 123abc .

     

    Do you need to display the data of the month selected in the filter in the table visualization? If I understand correctly, please refer to the following test, in my test, I use DiectQuery mode to connect two tables, one of the tables as a filter, if the data structure I use is different from yours, please feel free to correct me.

     

    Table_1

     

    filter_table

     

     

    Then I created a measure as follows.

    Measure = IF(SELECTEDVALUE(filter_table[Date]) = BLANK(), 1, IF(YEAR(MAX([Date])) = YEAR(SELECTEDVALUE(filter_table[Date])) && MONTH(MAX([Date])) = MONTH(SELECTEDVALUE(filter_table[Date])), 1, 0))

     

    Put the measure into the visual-level filters, set up show items when the value is 1.

     

    Put the Date field of filter_table into Filter

     

    Output:

     

    Best Regards,
    Yulia Xu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • grasa's avatar
    grasa
    1 year ago

    Thanks to all for your help, I think I found a solution that works for me: I created a new calendar table which includes all the dates from my "_vorauss.Baubeginn" column. Within this table I created a new mmmm-yyyy column.