Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dynamic Date Title For Report

Hello, I am wanting to get the last 3 months from the current month for a title for my report. This is what I want it to say but in PowerBI. So now the title should say March 2022 - June 2022. Any ideas?!

 

  • Anonymous 

    Create this measure:

     

    Title = 
    VAR _current_month = FORMAT(TODAY(), "MMMM YYYY")
    VAR _3months_before =  FORMAT(EOMONTH(TODAY(), -3), "MMMM YYYY")
    RETURN
    "First Bank " & UNICHAR(10) & " Monthly Dellinquent Loans Comparison " & _3months_before  & " - " & _current_month

     

     


    Then put it in a card visual for example:

  • SpartaBI's avatar
    SpartaBI
    4 years ago

    Anonymous 

     

    Title = 
    VAR _current_month = FORMAT(TODAY(), "MMMM YYYY")
    VAR _january_this_year = FORMAT(DATE(YEAR(TODAY()),1,1), "MMMM YYYY")
    RETURN
    "First Bank " & UNICHAR(10) & " Monthly Dellinquent Loans Comparison " & _january_this_year  & " - " & _current_month

     

     


    Showcase Report – Contoso By SpartaBI


          

10 Replies

  • SpartaBI's avatar
    SpartaBI
    Community Champion

    Anonymous 

    Create this measure:

     

    Title = 
    VAR _current_month = FORMAT(TODAY(), "MMMM YYYY")
    VAR _3months_before =  FORMAT(EOMONTH(TODAY(), -3), "MMMM YYYY")
    RETURN
    "First Bank " & UNICHAR(10) & " Monthly Dellinquent Loans Comparison " & _3months_before  & " - " & _current_month

     

     


    Then put it in a card visual for example:

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have a follow up question. How do I get my months to match what I have in my report title. I just want to show the last 3 months from the current month. 

     

    • SpartaBI's avatar
      SpartaBI
      Community Champion

      Anonymous you can use the date column in the filter pane or a slicer and set it to last 3 calendaric months under the relative date option

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hello, how would I make a title card that says January 2022 - the current month and year?