Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Matrix with Date Repeating

Hello

I have a matrix very simple with dates across the top and text list down the side each one with a date 

My date headers are repeating across the top I would like to have it by months and years across top in order.

 

  • shafiz_p's avatar
    shafiz_p
    2 years ago

    Suggesting you to if possible, then share your data  or create a Year , and month column from date in dax or power query. Then combine for yearmonth column and just place it in column section. I hope it will not repeat. Delete the old visual and create a new matrix visual.

    Hope this helps!!

  • zenisekd's avatar
    zenisekd
    2 years ago

     

    • In the Fields pane, click on the dropdown arrow next to your date column and choose New Column. You will create a new calculated column with the required date format.

    • In the formula bar, use the following DAX expression:

      DAX FormattedDate = FORMAT([YourDateColumn], "MMM yy")
      • Replace [YourDateColumn] with the actual name of your date column.
      • "MMM yy" is the format for displaying the month in abbreviated form (like Nov, Dec) and the year in two digits (like 23 for 2023).
      • Press Enter to create the new formatted date column.

8 Replies

  • If I understand your requirement correctly,  do you want to have in the top year (once) and below it months? 

    This could be solved by instead of inserting one field with year + month, inserting two fields - year and month. 

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    I would like it show Oct 23 Nov 23 Dec 23 etc

    • shafiz_p's avatar
      shafiz_p
      Super User

      Anonymous  I think you have problem with your date table. In my case it is not repeating. See the image below:

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Yes I agree not sure how to fix it. 

        the column is just a list of dates in dd/mm/yyyy format

  • Hi Anonymous  

    I think you are looking column header as like as the given image.

     

     

    Just place date hirarchy or simply year and month column in column section and drill down to last steps. And you will get your desired result.

    Hope this helps!!
    If this solved your problem, please accept it as a solution!!

    Best Regards,
    Shahariar Hafiz



    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you I worked that out is there a way to show Nov 23 Dec 23 rather than two rows?

      • zenisekd's avatar
        zenisekd
        Super User

         

        • In the Fields pane, click on the dropdown arrow next to your date column and choose New Column. You will create a new calculated column with the required date format.

        • In the formula bar, use the following DAX expression:

          DAX FormattedDate = FORMAT([YourDateColumn], "MMM yy")
          • Replace [YourDateColumn] with the actual name of your date column.
          • "MMM yy" is the format for displaying the month in abbreviated form (like Nov, Dec) and the year in two digits (like 23 for 2023).
          • Press Enter to create the new formatted date column.