Forum Discussion
Slicer returning results outside date range
Hi Janey
My date table is generated with the following query.
let
Source = List.Dates(StartDate, Length, #duration(1, 0, 0, 0)),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
StartDate = #date(2017, 7, 1),
Today = DateTime.Date( DateTime.LocalNow()),
Length = Duration.Days(Today - StartDate)+547,
Custom1 = #"Renamed Columns",
#"Fin Year Aus" = Table.AddColumn(Custom1, "Financial Year AUS",each Date.Year([Date]+#duration(184, 0, 0, 0))),
#"Fin Month Aus" = Table.AddColumn(#"Fin Year Aus", "Financial Month AUS", each Number.Mod(Date.Month([Date])+6,12)),
#"Inserted Year" = Table.AddColumn(#"Fin Month Aus", "Year", each Date.Year([Date]), Int64.Type),
#"Inserted Month" = Table.AddColumn(#"Inserted Year", "Month", each Date.Month([Date]), Int64.Type),
#"Inserted Month Name" = Table.AddColumn(#"Inserted Month", "Month Name", each Date.MonthName([Date]), type text),
#"Inserted Day" = Table.AddColumn(#"Inserted Month Name", "Day", each Date.Day([Date]), Int64.Type),
#"Inserted Day Name" = Table.AddColumn(#"Inserted Day", "Day Name", each Date.DayOfWeekName([Date]), type text),
#"Inserted Day of Week" = Table.AddColumn(#"Inserted Day Name", "Day of Week", each Date.DayOfWeek([Date])+1, Int64.Type),
#"Inserted Week of Month" = Table.AddColumn(#"Inserted Day of Week", "Week of Month", each Date.WeekOfMonth([Date]), Int64.Type),
#"Inserted Week of Year" = Table.AddColumn(#"Inserted Week of Month", "Week of Year", each Date.WeekOfYear([Date]), Int64.Type),
YYMM = Table.AddColumn(#"Inserted Week of Year", "YYMM", each ([Year]-2000)*100+[Month]),
ID = Table.AddColumn (YYMM, "ID", each (Date.Year([Date]) - Date.Year(StartDate))*12 + Date.Month([Date])),
#"Changed Type" = Table.TransformColumnTypes(ID,{{"Date", type date}, {"Financial Year AUS", Int64.Type}, {"Financial Month AUS", Int64.Type}, {"YYMM", Int64.Type}, {"ID", Int64.Type} }),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type",0,12,Replacer.ReplaceValue,{"Financial Month AUS"}),
#"Extracted Date" = Table.TransformColumns(#"Replaced Value",{})
in
#"Extracted Date"
I am using the Date column from that for my slicer, and it the second date column in the pictures given.
That date column is linked 1:many to the Date_Of_Order column with cross filtering set to single
I have simplified it by taking out all information, other than the dates.
I get that if the date slicer has the entire range selected, then it wont filter the table. I just want to know if there is a way to configure the slicer or table so that it does.
Thanks again
Hugh
- v-janeyg-msft5 years ago
Community Support
Hi, DonIncognito
The date range of your original date table is larger than the fact table. You can try to directly use the date of the fact table instead of the date table in the visual.
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.