Forum Discussion
Slicer - Date and Time
- 9 years ago
Hi majidht,
I can reproduce your scenario, I get date from SSAS with inport mode as follows.
First, I can change the Text to Date type using the Formatting feature, please see the following screenshot.
Second, If you can not change the data type directly, you can split the date column to year, month, day column in Power Query Editor. Please select Split Column under on Query Editor Home, click appropriate delimiter.
When you get year, mon, day. If Month column is January format, you can use the following formula to change it to number.SWITCH([Month], "January", 1,"February", 2, "March",3, "April",4 , "May", 5,"June", 6, "July", 7, "August",8 , "September",9, "October", 10, "November",11, "December" 12 , 0 )
Then you can use DATE function to create calculated column to get Date column.Date=DATE([Year],[Month],[day])
Finally, you can create a slicer as Tulio_DL posted. In addition, there is a similar thread you can reference to.
Best Regards,
Angelia
Yes! that's the problem. I am getting data from SSAS(I've created cubes and dimensions in visual studio), so there reason I am having problems is that all my dimensions are in text data type and I cannot convert them to numeric or date. I think my original question has been totally changed lol.
majidht if you are using ssas and you have a time dimension you need to make sure your settings are correct on the ssas side
in your time dimension make sure you have your date field in the value columm ( you get value, key and name), the value must be set to the date field
- majidht9 years agoFrequent Visitor
Thanks Tulio_DL vanessafvg v-huizhn-msft for your replies it was great help to me guys.