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
prvn
Frequent Visitor

Filter from Dimension table to have records from Fact table

I have a Database with following Dimensions and Fact table.

 

CREATE TABLE DimCategory
(
	ID INT IDENTITY(1,1) PRIMARY KEY,
	Name VARCHAR(100) NOT NULL,
	...
)
GO

CREATE TABLE DimSubCategory
(
	ID INT IDENTITY(1,1) PRIMARY KEY,
	Name VARCHAR(100) NOT NULL,
	CategoryID INT FOREIGN KEY REFERENCES DimCategory(ID),
	...
)
GO

CREATE TABLE DimLocation
(
	ID INT IDENTITY(1,1) PRIMARY KEY,
	Name VARCHAR(100) NOT NULL,
	...
)
GO

CREATE TABLE DimDate
	(	[DateKey] INT primary key, 
		[Date] DATETIME,
		...
	)
GO

CREATE TABLE FactConsumed
(
	ID INT IDENTITY(1,1) PRIMARY KEY,
	Name VARCHAR(100) NOT NULL,
	CategoryID INT FOREIGN KEY REFERENCES DimCategory(ID),
	SubCategoryID INT FOREIGN KEY REFERENCES DimSubCategory(ID),
	LocationID INT FOREIGN KEY REFERENCES DimLocation(ID),
	DateID INT FOREIGN KEY REFERENCES DimDate(DateKey),
	...
)
GO

When i add filters from dimension tables Category, SubCategory, Location, Date from dimension tables for the report in Power BI, the filter shows all records that does not exist in Fact table. How can i restrict the filters to show only the records that are in Fact. Example the date range filter should only display date range based on Fact table available date ranges. When Project record is selected in filter, other filters should update to show records related to the selected project that is in the Fact table.

 

 

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@prvn ,

 

Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.

 

Regards,

Jimmy Tao

v-yuta-msft
Community Support
Community Support

@prvn ,

 

The selection in a slicer chart will show every data in one column. So I'm afraid slicer will show every data in the dimensional table. You can create a slicer based on columns in fact table instead.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.