Forum Discussion
Dynamically Format Date based on Slicer Selection
- 4 years ago
Hi, Matt_Joers
Try to create a measure like this:Format = SWITCH( SELECTEDVALUE(Slicer[Processing Interval]), "Daily",FORMAT(MAX('Table'[Date]),"mmm dd yyyy"), "Prior Month",FORMAT(MAX('Table'[Date]),"mm yyyy"), "Year To Date",FORMAT(MAX('Table'[Date]),"mmm dd yyyy") )
Result:If you only want to see the formatted date, you can change the column width of the service date column to 0.
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Matt_Joers
Try to create a measure like this:
Format =
SWITCH(
SELECTEDVALUE(Slicer[Processing Interval]),
"Daily",FORMAT(MAX('Table'[Date]),"mmm dd yyyy"),
"Prior Month",FORMAT(MAX('Table'[Date]),"mm yyyy"),
"Year To Date",FORMAT(MAX('Table'[Date]),"mmm dd yyyy")
)
Result:
If you only want to see the formatted date, you can change the column width of the service date column to 0.
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.