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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Kay_Kalu
Frequent Visitor

DAX not returning the correct Format

I have the measure for my title 

TitleOfSelectedTerm2 = CONCATENATEX(VALUES(REF070_PRODUCT_TAXONOMY[COMPANY]),REF070_PRODUCT_TAXONOMY[COMPANY],", ",[COMPANY], ASC)&" Terminations & Lapses -
"&FORMAT(CONCATENATEX(VALUES('LIGHTHOUSE_CALENDAR'[SelectionDate]),LIGHTHOUSE_CALENDAR[SelectionDate],", ",[SelectionDate], ASC), "MMM YYYY")

Every other thing return propely except the format for the date. it returns 10/1/2024,11/1/2024 while I want Oct 2024, Nov2024.

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @Kay_Kalu ,

 

The issue is that the FORMAT() function is being applied after CONCATENATEX(), so it’s trying to format a comma-separated string of dates rather than formatting each individual date before concatenation.

To fix this, you should format the individual dates inside the CONCATENATEX(), like this:

TitleOfSelectedTerm2 =
CONCATENATEX(
    VALUES(REF070_PRODUCT_TAXONOMY[COMPANY]),
    REF070_PRODUCT_TAXONOMY[COMPANY],
    ", ",
    [COMPANY],
    ASC
)
& " Terminations & Lapses - "
& CONCATENATEX(
    VALUES('LIGHTHOUSE_CALENDAR'[SelectionDate]),
    FORMAT('LIGHTHOUSE_CALENDAR'[SelectionDate], "MMM YYYY"),
    ", ",
    'LIGHTHOUSE_CALENDAR'[SelectionDate],
    ASC
)

This way, each SelectionDate is individually formatted to "MMM YYYY" before being concatenated. Let me know if you want to remove duplicates or fine-tune spacing.

 

Best regards,

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @Kay_Kalu ,

 

The issue is that the FORMAT() function is being applied after CONCATENATEX(), so it’s trying to format a comma-separated string of dates rather than formatting each individual date before concatenation.

To fix this, you should format the individual dates inside the CONCATENATEX(), like this:

TitleOfSelectedTerm2 =
CONCATENATEX(
    VALUES(REF070_PRODUCT_TAXONOMY[COMPANY]),
    REF070_PRODUCT_TAXONOMY[COMPANY],
    ", ",
    [COMPANY],
    ASC
)
& " Terminations & Lapses - "
& CONCATENATEX(
    VALUES('LIGHTHOUSE_CALENDAR'[SelectionDate]),
    FORMAT('LIGHTHOUSE_CALENDAR'[SelectionDate], "MMM YYYY"),
    ", ",
    'LIGHTHOUSE_CALENDAR'[SelectionDate],
    ASC
)

This way, each SelectionDate is individually formatted to "MMM YYYY" before being concatenated. Let me know if you want to remove duplicates or fine-tune spacing.

 

Best regards,

Thanks @DataNinja777 .

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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