The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.😊
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
21 | |
14 | |
14 | |
9 | |
7 |