Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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:
Solved! Go to Solution.
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.
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 😊
You are always wellcome.😊
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
10 | |
9 | |
9 |
User | Count |
---|---|
15 | |
12 | |
12 | |
11 | |
11 |