Forum Discussion
How to create Select query with where clause with AND condition in Power BI
You can directly write your queries using Advanced option in SQL source. It allows using All SQL functions. Try following steps
1) Write your SQL query in Advanced option. Give sample values instead of variables like FirstDate etc.
2) Once data is imported, create Power BI parameters for your SQL Query.
3) Go to Advanced Editor and Replace sample values with your newly created Parameters. Check the link I shared or any other link online.
4) Click on Refresh, your data will now be imported based on values provided in Parameters.
Unfortuately, don't have time to create Source and then End to End PBIX file.
Hi Ankit,
Thanks for this .But i dont have have sql database as source.I am getting data from Odata feed where i am getting tables and i want to create table/matrix which gives me same output as sql queries after execution.
So basically i want whcih DAX functions i have to use to get same output as above SQL query .
- AnkitBI7 years ago
Solution Sage
Ok.. You didn't mention OData source in your requirements. Most of these will be done in Power Query which is ETL for Power BI rather than DAX which is primarily for Data Modelling. Share sample data of your tables and expected output. Then I will have a look but this can take time.