Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

create report in Power BI using SQL code

Hi,

I have developed a code in SQL Server joining 6 tables(inclues left outer join), now I have to develop a report in Power BI using this code by allowing the user to filter the report by dates while running it.

I tried to import the code in Power BI but since its having huge volumes of data iam unable to use this mode.

I also tried to import tables first and created relationships between them but since I am having left outer join this also did not work.

 

Please suggest a method how to develop a report by letting user to filter by date.

1 ACCEPTED SOLUTION

are you able to share , some dummy data?  best thing to do is put your sql query in the advanced section, expand and paste, have you done that?

 

vanessafvg_0-1613159683798.png

you can also create parameters for the date, 

this article gives a good explanation.  

 

https://blog.crossjoin.co.uk/2016/12/11/passing-parameters-to-sql-queries-with-value-nativequery-in-...

 

If you have specific questions please feel free to ask.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

how much data are you trying to import in?     How are you importing the code in?   Can you please share the steps of what you are doing.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Its approximately 4 years of data thats the reason the user is using date filter and running the report. One month has 39000 records.

I created code in SQL joing 6 tables as per business requirement, the same I need to develop in Power BI, giving option for user to select date.

are you able to share , some dummy data?  best thing to do is put your sql query in the advanced section, expand and paste, have you done that?

 

vanessafvg_0-1613159683798.png

you can also create parameters for the date, 

this article gives a good explanation.  

 

https://blog.crossjoin.co.uk/2016/12/11/passing-parameters-to-sql-queries-with-value-nativequery-in-...

 

If you have specific questions please feel free to ask.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors