Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
dbrandone
Helper IV
Helper IV

Weird Dynamic Button Text Issue

So I have 4 buttons set up for page navigation within a report. 2 of the pages are Current Year Data and another is "Last Month". Instead of having Static text for the buttons as "Current Year" and "Last Month", I wanted the buttons to be dynamic with the text. I wrote the measures as:

Last Month Button Text =

     Calculate(
             Values('Date'[Month Name]),
             'Date'[Month Offset] = -1
           )

 

Current Year Button Text =

      Calculate(

              Values('Date'[Year]),

               'Date'[Year Offset] = 0

          )

 

The Last Month measure is not greyed out and works perfectly in the Button and shows November. The issue is the Current Year button as the measure is greyed out in the field value drop down. I have tried different measures for the current year, but all still have the measure greyed out and un-selectable. I have tried "Max" instead of "Values".

 

Does anyone know what could be causing this. I have made sure that the columns being filtered or used are in the correct format.

1 REPLY 1
ebeery
Memorable Member
Memorable Member

Hi @dbrandone, it appears from my testing that only Text columns/measures can be returned as button text.  In your case, "Month Name" is a text value, while "Year" is likely numeric.

You could try either converting Year to Text, or wrapping your "Current Year Button Text" in a FORMAT function like below:

Current Year Button Text =
FORMAT (
    CALCULATE ( VALUES ( 'Date'[Year] ), 'Date'[Year Offset] = 0 ),
    "General Number"
)

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.