cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

FORMAT INSTRUCTION WITHIN DYNAMIC TITLE MEASURE NOT APPLYING

I have a measure which shows which months have been selected from a slicer

The below syntax works, but ignores my FORMAT argument, therefore if I select Jan and Feb 2021 from my slicer (called Reporting Period), the FILTER measure displays "REPORTING MONTHS: 01/01/2021 | 01/02/2021"

FILTER = IF(ISFILTERED('Dim_Date'[REPORTING PERIOD]), "REPORTING MONTHS: "& UPPER(FORMAT(CONCATENATEX(VALUES('Dim_Date'[REPORTING PERIOD]),'Dim_Date'[REPORTING PERIOD]," | "),"MMM YYYY")))

What I want to appear is "REPORTING MONTHS: JAN 2021 | FEB 2021"

Is this possible within this type of measure?

 

 

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Super User
Super User

@Anonymous - The FORMAT is outside of the CONCATENATEX so it will not be recognised as DATE.  You might be able to try something like:

FILTER = 
VAR _RepMths = 
DISTINCT(
SELECTCOLUMNS(
'Dim_Date' ,
"Formatted Reporting Months" ,
FORMAT( 'Dim_Date'[REPORTING PERIOD], "MMM YYYY")
)
)
RETURN
IF(
ISFILTERED('Dim_Date'[REPORTING PERIOD]),
"REPORTING MONTHS: "& UPPER( CONCATENATEX( _RepMths , [Formatted Reporting Months] ," | ") ),
BLANK()
)

View solution in original post

2 REPLIES 2
Daryl-Lynch-Bzy
Super User
Super User

@Anonymous - The FORMAT is outside of the CONCATENATEX so it will not be recognised as DATE.  You might be able to try something like:

FILTER = 
VAR _RepMths = 
DISTINCT(
SELECTCOLUMNS(
'Dim_Date' ,
"Formatted Reporting Months" ,
FORMAT( 'Dim_Date'[REPORTING PERIOD], "MMM YYYY")
)
)
RETURN
IF(
ISFILTERED('Dim_Date'[REPORTING PERIOD]),
"REPORTING MONTHS: "& UPPER( CONCATENATEX( _RepMths , [Formatted Reporting Months] ," | ") ),
BLANK()
)
Anonymous
Not applicable

Thanks you clever little sausage! It worked perfectly! Didn't occur to be to create a variable. Great 😄

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors