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
chulpanvl
Helper I
Helper I

dimension tables contain textual +date columns - how to make a relationship with fact and calendar

chulpanvl_0-1661237384124.png

Hi! my current data model is presented above. However, I need to introduce a date column to the dimension tables and make a relationship with calendar table as well. If I do so, I will end up with many-to-many relationship of dimension tables with calendar and dimension tables with fact table.  What is the best way to work with such cases? 

 

Here you can find a sample data and board to play with.

2 REPLIES 2
amitchandak
Super User
Super User

@chulpanvl , Do not create a relationship if you just want to filter the slicer of other dimensions using dates

 

You can create a measure like this using a dim table and date in it and use it in the visual level filter and check for not blank

 

new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return
Countrows(  filter('dim1', 'dim1'[Date] >=_min && 'dim1'[Date] <=_max))

 

How to filter the slicer of a disconnected table: https://youtu.be/cV5WfaQt6C8

@amitchandak thank you for your response!

In the end I want to create a measure based on my fact table which is filtered by dimension table (see a  screen) which will also take into account differences in groups of items from year to year.

I explained my case in more detail in this topic.

 

chulpanvl_0-1661349153892.png

 

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.