Forum Discussion

Upali63's avatar
Upali63
Helper II
2 years ago
Solved

Format Date in Matrix Title

I have below shown title in my matrix . Here I want the date to be shown in

"Total Quantities Sold for the day - 12-Oct 2023" (date format to be changed). I have tried with format command but it does not work. Please help to solve the above issue.

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Upali63 ,

    To change the date format in your matrix title, you need to use a DAX expression that returns the formatted date as a text value. You can use the FORMAT function to do this.

    "Total Quantities Sold for the day - " & FORMAT([Date], “dd-MMM-yyyy”)

    This will return a text value like “Total Quantities Sold for the day - 12-Oct-2023”. You can then use this expression as the title of your matrix visual.

    Alternatively, you can create a new measure that returns the formatted date as a text value.

    Formatted Date = FORMAT(MAX([Date]), “dd-MMM-yyyy”)

    This will return the maximum date in your data set as a text value in the format “dd-MMM-yyyy”. You can then use the following expression as the title of your matrix visual:

    "Total Quantities Sold for the day - " & [Formatted Date]

    Power BI Date Format Hack to Change the Date in Any Format - YouTube

    How to CHANGE Date FORMAT in Power BI - YouTube

    Power BI Tutorial on Date Formatting and adding Formatted Date to Slicer - YouTube

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

     

     

     

     

3 Replies

    • Upali63's avatar
      Upali63
      Helper II

      Thanks

       

      Result is still the same

       

      Below is my calendar Table

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Upali63 ,

    To change the date format in your matrix title, you need to use a DAX expression that returns the formatted date as a text value. You can use the FORMAT function to do this.

    "Total Quantities Sold for the day - " & FORMAT([Date], “dd-MMM-yyyy”)

    This will return a text value like “Total Quantities Sold for the day - 12-Oct-2023”. You can then use this expression as the title of your matrix visual.

    Alternatively, you can create a new measure that returns the formatted date as a text value.

    Formatted Date = FORMAT(MAX([Date]), “dd-MMM-yyyy”)

    This will return the maximum date in your data set as a text value in the format “dd-MMM-yyyy”. You can then use the following expression as the title of your matrix visual:

    "Total Quantities Sold for the day - " & [Formatted Date]

    Power BI Date Format Hack to Change the Date in Any Format - YouTube

    How to CHANGE Date FORMAT in Power BI - YouTube

    Power BI Tutorial on Date Formatting and adding Formatted Date to Slicer - YouTube

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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