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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gdexter
Frequent Visitor

Dynamic text based on Month Name IMPOSSIBLE?

Power BI Community,

 

Reaching out for help!

 

I want to create a dynamic text that changes based on the filtered selection. I have been attempting to use if and iscrossfiltered in DAX. I don't know what to write in order to output the actual name of the month. Below is my attempt:

 

MEASURE2.PNG

 

The "DAILY DATES" column above is just a list of all the days in 2017. I have a slicer that allows me filter them on month-month basis.

 

 

Thanks,

Gdextor

 

 

 

 

 

1 ACCEPTED SOLUTION

@Anonymous

 

Problem Solved...

 

Formula.PNG

 

The "-1" in the current month line had to be changed to a "0".

 

Many thanks,

Gdexter

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Try this

 

Measure =
IF (
    ISFILTERED ( 'DAILY DATEs'[Daily] ),
    "Looking at payment data between " & [SELECTED MONTH - 1]
        & [SELECTED MONTH],
    "Please Select a month"
)

If that doesnt work try the second one

 

 

 

Measure =
IF (
    ISFILTERED ( 'DAILY DATEs'[Daily] ),
    "Looking at payment data between "
        & FORMAT ( EOMONTH ( MIN ( 'DAILY DATEs'[Daily] ), -1 ), "MMMM YYYY" )
        & FORMAT ( EOMONTH ( MAX ( 'DAILY DATEs'[Daily] ), -1 ), "MMMM YYYY" ),
    "Please Select a month"
)

 

Hi @Anonymous,

 

Thanks for the solution. The second formual worked form (I had to change isfiltered to iscrossfiltered) but instead of showing the selected month and the month before the selected month, the month before the selected month is shown twice. I have attached image below.

 

Can you suggest a fix for this?

QUERY.PNG

 

Also including the actual formula I used, in case you wish to confirm.

Formula.PNG

 

Many thanks,

Gdexter

@Anonymous

 

Problem Solved...

 

Formula.PNG

 

The "-1" in the current month line had to be changed to a "0".

 

Many thanks,

Gdexter

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.