cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ccapowerbi Member
Member

Slicer with Direct Query & Import (i.e., Composite Model)

Hello all!

 

I hope you are all doing well.

 

I've used direct query for my first time which nicely satisfied a user requirement. I now have a report where I'm using both direct query & import (i.e., composite model).

 

The table pulled in via direct query has many line items (i.e., rows) from different locations; these locations are identified by different numbers (e.g., Texas = 13, California = 14, etc.). I import an excel file & use that as the location lookup; this has one row per location.

 

Prior to using direct query, I simply created a one-to-many relationship between my location lookup table & other tables that contained several rows of information per location. I would then use a slicer (using the numeric location value from my location lookup table) on pages that displayed table/matrix visuals containing several rows of data per location to allow my users to view information for locations they were interested in.

 

I tried the same approach with direct query, but my slicer (using location numeric values from my location lookup table) doesn't filter the table/matrix visuals to only show rows related to the numeric location values specified in the slicer. I did create a one-to-many relationship between the table linked via direct query & my location lookup table imported from excel.

 

I've looked at my go-to PBI educational spots (Curbal, GIAC, & PBI community) & I cannot find anything that speaks to this specific problem, so I"m posting here. 

 

I know I'm committing a sin by not posting my data, but I'm not entirely sure how (or if I'm allowed) to set up my company's SQL server to allow PBI community members to access it (even test data). To atone for this grievous sin, I shall give all respondents a thumbs up & one lucky soul's response shall be accepted as a solution. 

 

God bless all of you 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
ccapowerbi Member
Member

Re: Slicer with Direct Query & Import (i.e., Composite Model)

@v-cherch-msft 

 

HEY!

 

The easiest workaround I could come up with was adding the location value to the SQL table; I then used the location value from that table (as opposed to the location value in the (separate) lookup table) as the slicer. This works because I'm using the SQL data on one page of the report so there is no need to have the location value--used in the slicer--filter another table.

 

Thanks for replying.

View solution in original post

2 REPLIES 2
Highlighted
v-cherch-msft Super Contributor
Super Contributor

Re: Slicer with Direct Query & Import (i.e., Composite Model)

Hi @ccapowerbi 

I cannot reproduce the same issue.I would suggest you re-create and check the relationship and test again.Some articles for your reference:

https://docs.microsoft.com/en-us/power-bi/desktop-composite-models

https://radacad.com/composite-model-directquery-and-import-data-combined-evolution-begins-in-power-b...

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ccapowerbi Member
Member

Re: Slicer with Direct Query & Import (i.e., Composite Model)

@v-cherch-msft 

 

HEY!

 

The easiest workaround I could come up with was adding the location value to the SQL table; I then used the location value from that table (as opposed to the location value in the (separate) lookup table) as the slicer. This works because I'm using the SQL data on one page of the report so there is no need to have the location value--used in the slicer--filter another table.

 

Thanks for replying.

View solution in original post

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 209 members 2,268 guests
Please welcome our newest community members: