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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
smwixted
New Member

Switching Date type in a matrix column

I have a dataset with Date Shipped, Date Delivered & Date Paid columns. I want to have a slicer that I can choose which date column to use. The dates have relationships to get the year, period and week number. I have been able to complete what I want by using parameters, but I want the periods to default showing when the selection is made (as shown below), but it collapses to year with the use of a parameter.

smwixted_0-1715740269168.png

Therefore my thought was to create a table with a [Time] column that has Date Paid, Date Shipped & Date Delivered for which to create a slicer that I could then create a measure using SWITCH(SELECTEDVALUE([TIme]),"Paid Date", Paid Date column,"Shipped Date", Shipped Date Column), but I found that I was not able to use the Date in the formula as I thought I would. Any ideas?

2 REPLIES 2
smwixted
New Member

Field Parameters works, but collapses the matrix to year, when I want it defaulted to expand 1 level to show period. Is there a way to accomplish without using field parameters?

vicky_
Super User
Super User

Field parameters might be able to solve part of the issue - https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
However, you'll need to use some SWITCH statements to select whether to use the Date Shipped, Date Delivered & Date Paid in your DAX calculations.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.