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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
KellyM82
New Member

Add formating to ISFILTERED VAR measure

Hi there,

 

I have a DAX measure that returns the items selected from a slicer so that I can have the selected items listed within a table and the slicer panel hidden so it takes up less space on the canvas. It works for all slicers but it's currently returning the date format as MM/DD/YYYY and I need it to show as DD/MM/YYYY. The field is set to the correct format so I'm assuming I need to add the format into my DAX but I've tried a whole host of combinations and none are working. The DAX is as follows:

=
    -- Date
    IF(
        ISFILTERED('Data Table: Population'[Date]),
        VAR items = VALUES('Data Table: Population'[Date])
        VAR itemscombined = CONCATENATEX(items, 'Data Table: Population'[Date], UNICHAR(10))
        RETURN Itemscombined & UNICHAR(10)

Any help would be appreciated.
1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

To format the date in your DAX measure, you can use the FORMAT function. In your existing DAX measure, you can add FORMAT to change the date format from MM/DD/YYYY to DD/MM/YYYY. Here's the modified DAX:

 

=
-- Date
IF(
ISFILTERED('Data Table: Population'[Date]),
VAR items = VALUES('Data Table: Population'[Date])
VAR itemscombined = CONCATENATEX(items, FORMAT('Data Table: Population'[Date], "DD/MM/YYYY"), UNICHAR(10))
RETURN itemscombined & UNICHAR(10)
)

 

In this modified DAX, the FORMAT function is used to format the date from 'Data Table: Population'[Date] as "DD/MM/YYYY". This will ensure that the date is displayed in the desired format in your table.

Make sure to adjust the format string within the FORMAT function according to your specific requirements, such as "DD/MM/YYYY" or "DD-MM-YYYY", depending on how you want the date to be displayed.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

View solution in original post

3 REPLIES 3
123abc
Community Champion
Community Champion

To format the date in your DAX measure, you can use the FORMAT function. In your existing DAX measure, you can add FORMAT to change the date format from MM/DD/YYYY to DD/MM/YYYY. Here's the modified DAX:

 

=
-- Date
IF(
ISFILTERED('Data Table: Population'[Date]),
VAR items = VALUES('Data Table: Population'[Date])
VAR itemscombined = CONCATENATEX(items, FORMAT('Data Table: Population'[Date], "DD/MM/YYYY"), UNICHAR(10))
RETURN itemscombined & UNICHAR(10)
)

 

In this modified DAX, the FORMAT function is used to format the date from 'Data Table: Population'[Date] as "DD/MM/YYYY". This will ensure that the date is displayed in the desired format in your table.

Make sure to adjust the format string within the FORMAT function according to your specific requirements, such as "DD/MM/YYYY" or "DD-MM-YYYY", depending on how you want the date to be displayed.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

That's perfect, thank you so much 😊

123abc
Community Champion
Community Champion

You are always wellcome.😊

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.