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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

@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
v-cherch-msft
Employee
Employee

Hi @Anonymous 

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-bi

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.
Anonymous
Not applicable

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.