Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
How to bring data in power BI having two filters by using select quer , because currently what I am doing is taking too much time in bring data below is the query attached.
_________________________________________________________________________________________________________________________________________
let
Source = OData.Feed("https://toysrus.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderLines_table = Source{[Name="SalesOrderLines",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(#"Filtered Rows", each Text.StartsWith([SalesOrderNumber] = "SOO")),
#"Filtered Rows1" = Table.SelectRows(SalesOrderLines_table, each [RequestedReceiptDate] >= #datetimezone(2020, 1, 1, 0, 0, 0, 3, 0) and [RequestedReceiptDate] <= #datetimezone(2021, 1, 1, 0, 0, 0, 3, 0)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows1",{"RequestedReceiptDate", "SalesOrderLineStatus", "ItemNumber", "ShippingWarehouseId", "DeliveryAddressCity", "OrderedSalesQuantity", "SalesOrderNumber", "LineAmount"})
in
#"Removed Other Columns"
Hi @AnwarHabib ,
You can choose to use DAX to do it. In fact, DAX performs more efficiently.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AnwarHabib
if your source supports query folding, it could make sense to turn around the order of the last three steps.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
42 | |
42 |
User | Count |
---|---|
46 | |
40 | |
28 | |
27 | |
26 |