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
I don't know if i quite understood what you're trying to do. In my mind you have a whole report of sales working perfectly, but at just 1 of the graphs you would like it filtered by a period of time, is that so?
If so, by sellecting the graph and you can add the 'Calendar'[dates] as a filter on the visualization pannel. That will let you filter that just 1 graph by dates.
If it's quite not there yet, please give me more details and I'll try to help!
Hope it helps =]
- majidht9 years agoFrequent Visitor
Let me give you an example. I created facts and dimensions in SQL analysis server. In my current report I can create different charts and tables and slicers. For example, I want to see sales count by product category or sales by customer type. I can do this and then have a slicer for year, quarter or month to give me sales number by product category only in 2017 or only in January 2016. But imagine I want the same graph(sales number by product category) only in a specific time fram(like from 02/04/2015 to 03/05/2016). In this scenario, I cannot use a slicer or a filter to specify the start date and end date. Now I have to questions:
1-Is this achievable when I use connect live option(I connect to analysis server)?
2- If not, what is the solution if I use import option(to my understanding I need columns and DAX queries to make this possible)?