Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Good morning everyone,
My name is Sulaimon from Nigeria, Please i need help on my power bi report.
I want to query a record base on date range, for example
i have a record with columns and a date column and want to query this record to return data based on date range. For instance want to see only records between 1 to 15 days of every month. like 1 june 2022, 3 june 2022, 5 june 2022, 7 june 2022, 2 july 2022, 4 july 2022, 5 july 2022, 8 july 2022, 11 july 2022 and 13 july 2022 and so on... Will be very grateful if resolved
| Document No | Order_No | Posting_Date | Quantity | Amount |
| 1 june 2022 | ||||
| 3 june 2022 | ||||
| 5 june 2022 | ||||
| 7 june 2022 | ||||
| 21 june 2022 | ||||
| 23 june 2022 | ||||
| 2 July 2022 | ||||
| 4 July 2022 | ||||
| 5 July 2022 | ||||
| 8 July 2022 | ||||
| 11 July 2022 | ||||
| 13 July 2022 | ||||
| 21 July 2022 | ||||
| 23 July 2022 | ||||
Solved! Go to Solution.
Hi @Sulaimon,
Something like this?
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtIBIUNdr9I8XSMjCE8pVgcmYYxLwhSXhDkuCSOclhjhtMUIKJGDTcIEl4QpLgkLXBKGhjhljHHJGOHUY4SuJxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ocument No" = _t, Order_No = _t, Posting_Date = _t, Quantity = _t, Amount = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ocument No", type text}, {"Order_No", type text}, {"Posting_Date", type date}, {"Quantity", type text}, {"Amount", type text}}),
#"Inserted Day" = Table.AddColumn(#"Changed Type", "Day", each Date.Day([Posting_Date]), Int64.Type),
#"Filtered Rows" = Table.SelectRows(#"Inserted Day", each Date.Day([Posting_Date]) >= 1 and Date.Day([Posting_Date]) <= 15)
in
#"Filtered Rows"
The filter in the #"Filtered Rows" step. You can filter on any date and then change it manually in the editor.
Kind regards,
John
Hi @Sulaimon,
Something like this?
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtIBIUNdr9I8XSMjCE8pVgcmYYxLwhSXhDkuCSOclhjhtMUIKJGDTcIEl4QpLgkLXBKGhjhljHHJGOHUY4SuJxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ocument No" = _t, Order_No = _t, Posting_Date = _t, Quantity = _t, Amount = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ocument No", type text}, {"Order_No", type text}, {"Posting_Date", type date}, {"Quantity", type text}, {"Amount", type text}}),
#"Inserted Day" = Table.AddColumn(#"Changed Type", "Day", each Date.Day([Posting_Date]), Int64.Type),
#"Filtered Rows" = Table.SelectRows(#"Inserted Day", each Date.Day([Posting_Date]) >= 1 and Date.Day([Posting_Date]) <= 15)
in
#"Filtered Rows"
The filter in the #"Filtered Rows" step. You can filter on any date and then change it manually in the editor.
Kind regards,
John
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |