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

Allow user select specific rows from SQL Server with Direct Query and slicer

I have a chart which currently displays all the values from an Azure SQL server database which is connected to Power BI report with Direct Query. The data are refreshed in a specific interval. Apparently this database is populated with almost 300 values every day.

 

I could manage to retrieve only the latest 500 rows from the generated table through this advice.

 

The ideal scenario (and the demands of the client) is that through a input field (a slicer possibly?) the user of the report could retrieve a particular number of rows from the table that form the chart.

 

Is this possible?

 

Thanks in advance

 

 

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Theoretically, there is no way to enter fields in powerbi to get results. But it is possible to count the number of rows of a table composed based on filter conditions by creating a measure formula. Azure SQL Database with DirectQuery


Can you further describe your requirements or provide relevant test data and screenshots of the desired results so that I can answer you as soon as possible?


Looking forward to your reply.


Best Regards,
Henry

 

Anonymous
Not applicable

Hi @v-henryk-mstf  and thank you for your answer,

 

Could you guide me through the process of creating a measure formula. My scenario include a slicer with checkboxes and the label "Choose latest number of values to generate graph". The checkboxes will be:

 500

 1000

 1500

 2000

 

where the numbers represent the latest values retrieved from the database.

 

Thanks again.

 

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.