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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JLEmlet
Regular Visitor

Dynamically change where statement from slicer selection

Hello -

We're beginners at Power BI and are running into an interesting problem.  We have a table with over 5.9M rows.  We only need to display one customer at a time which brings the max rows to about 500K for the largest client.  Rather than import all 6M rows into the Power BI query, is there a way the user selects the customer first and then we use that selection to drive the DirectQuery to only return that client? 

Thanks in advance.

JE

7 REPLIES 7
v-yetao1-msft
Community Support
Community Support

Hi @JLEmlet 

I do not quite understand what you mean. As you said , you want to display one customer at a time, is customer a single column of values in your data source ? If yes , you can connect to SQL to load the data and then add a slicer with the field “customer” to filter one customer .

Original data :

Ailsamsft_0-1641195766463.png

Filter data :

Ailsamsft_1-1641195766463.png

Best Regard

Community Support Team _ Ailsa Tao

I'd rather be able to use DirectQuery since the underlying data updates every couple of minutes.  But there are nearly 5m rows and the server is an on-prem server and the PowerBI report is deployed in the cloud. So it takes about a minute for the query to run against the database.  But if the query ran only for the customer selected in the slicer, it would only be 10K rows or so per client returning in just a few seconds.  But that would require the slicer to be able to pass the selection into the DirectQuery.  Is that a possible solution?

smpa01
Super User
Super User

@JLEmlet  what is the data source?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

The other line data is in a SQL Server table

Sorry about that, it should have said the underlying data is in a SQL server table.

ebeery
Solution Sage
Solution Sage

@JLEmlet what is the motivation behind not wanting to import all 6M rows?  6M rows is really not very large in terms of what Power BI can handle, and your performance is likely to be significantly better if you are using Import mode versus DirectQuery.

The data in the underlying table updates about every 20 to 30 minutes. So we want the power but I report to Always have the latest data, and we're deploying it to the Power BI website. That only allows a seven updates per day. So we're going for a Live connection to the data source. I guess another option would be to create a tabular cube And have that refresh every time the data refreshes. Any ideas?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.