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.

Resolver I

## Find selected value in many to many relation

Hi,

the following problem is part of a bigger, much more complex problem, so please dont ask for the sense in the model. It has to be that way because of the bigger context which would take much more text to explain.

Situation as follows:

i have a table Facts

 ID Value From to Connect A 1 01.01.2023 10.01.2023 1 A 2 10.01.2023 31.01.2023 1 B 1 01.01.2023 10.01.2023 1 B 2 10.01.2023 20.01.2023 1 B 3 20.01.2023 31.01.2023 1

And I have a timetable like this:

 Date Connect 01.01.2023 1 02.01.2023 1 ... ... 30.01.2023 1 31.01.2023 1

Both tables are connected over the two connect columns, so every row is connected to every row.

There is a slicer with Date in it and single select.

What i want to achieve is a measure, that takes into account which date ist selected in the slicer and then filters a visual depending wheter the row is actual (means >= From and < To) or not.

So for example if i select the 21.01.2023 then the resulting facts should look like this:

 ID Value From To Connect A 2 10.01.2023 31.01.2023 1 B 3 20.01.2023 31.01.2023 1

I need the timetable, because this logic is applied to other tables at the same time too. So i cannot use a slicer on the Facts table itself or something like that. Other aspects, like how tables are connected, could be changed eventually.

Any thoughts on this? thank you so much

5 REPLIES 5
Resolver I

Thanks for your replies

@foodd you can see a sample pbix in the first answer. Unfortunately Im not sure if I can do it the way it is done there. There all rows are multiplied by the amount of dates involved. This is ok for a exaple like this. @Ashish_Mathur , how does this scale with a million rows in it?

Super User

Not sure.  Try that yourself.

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Resolver I

What I wanted to say is that i cannot do it that way. But thanks for your effort though 🙂

Super User

Hi,

Please find attached the PBI file.

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Super User

This is difficult to visualize the state.  Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

## Helpful resources

Announcements

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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors