Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I would like to make a table in Power BI and have this SQL query. Can you help me how to fit these conditions into Power BI?
Any help highly appretiated.
Solved! Go to Solution.
Hi @poko . If you are trying to query your database using Power BI and get the data there. Simply go to Get Data and select your sql data source. You would then be promted to enter the credentials. Then, enter you sql query in the SQL statement option.
I hope it helps!
Abhinav
Hi @poko . I'm glad you have a starting point. If I understand this correctly for your second question, you can get rid of the dates in your where clause and let the user decide the dates/years they wanna see the data. Have the date column in your select clause and then use it to in slicer. Does this makes sense?
Yes it works but partly, Thank you.
Hi @poko . If you are trying to query your database using Power BI and get the data there. Simply go to Get Data and select your sql data source. You would then be promted to enter the credentials. Then, enter you sql query in the SQL statement option.
I hope it helps!
Abhinav
This works but I came across a one problem, I will need to change dates for criteria in red circles on the picture , how can I challege that in Power BI... I would like to use a simple slicers for dates, in Power BI to setup up dates criteria. Of course manually change code is simple but it has to work automatically, date slicers for users.
it should look like this (those data below are result of above I posted(SQL query)) but I will need to change "Years". This one below is for 2023
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |