Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello all,
The date table I'm using in my report goes back to 2015, but the table with data I'm using has an earliest date of 2018. I want to automatically filter the date table to the earliest date (2018) so that the extra years don't show up in slicers.
I tried to follow the steps in the link below, but Power Query would get stuck on this step (loading for a long time with no result)
Table.SelectRows(#"Changed Type", each List.Contains(#"Table 2"[BuildingID],[BuildingID]))
Solved! Go to Solution.
Get the earliest date from the data table (using List.Min(...))
Replace the condition in Table.SelectRows to keep the rows where the date is higher than this.
Get the earliest date from the data table (using List.Min(...))
Replace the condition in Table.SelectRows to keep the rows where the date is higher than this.
Okay so in my Date table query I added
let
StartDate = List.Min(#"FactTable"[Date]),
EndDate = List.Max(#"FactTable"[Date]),
but I'm not sure how to change the Table.SelectRows statement to keep the rows in between those dates. I have:
Table.SelectRows(#"Added Custom1", each List.Contains(#"DateTable"[CalendarDt],StartDate))
Oh got it now, I did the following:
= Table.SelectRows(#"Added Custom1", each [DtKey] >= (StartDate) and [DtKey] <= (EndDate))
Table.SelectRows can be slow depending on the condition applied. Why don't you limit the date table at creation time based on the max date in the Fact table? Create your own date table with CALENDAR in Dax or a Power Query calendar creation (lots available online)
I don't want to create a date table because I'm using one that has company holidays and closures factored in.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
60 | |
57 |
User | Count |
---|---|
188 | |
111 | |
105 | |
78 | |
71 |