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

Multiple date columns reacting to 1 slicer

Hi,

 

I'm pretty new to Power BI, been working with it for a couple of weeks now, and can't believe how much I've been struggling trying to set 1 slicer act for different date columns in different tables.
To explain my issue, I've created 2 simple tables and a date table (which I'm supposed to do in order to have 1 slicer respond to multiple tables, right?).

 

As you can see, ProjectID is the related column.

How can I create 1 date slicer so that it responds to both tables? Obviously I can't create a date table and relate it to both date columns as there is an indirect relationship between the 2 tables already.

 

tables.png

 

 

1 ACCEPTED SOLUTION

Hi @FrisoW @,

 

You can create two measures for two tables with the IF function, and then apply the measure to the visual filter.

You can refer to the pbix.

 

Best Regards,

Liang

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

View solution in original post

8 REPLIES 8
FrisoW
Helper I
Helper I

Thanks for your reply, I may not have explained myself enough, or I don't understand your reply sorry.

I recreated the visual in PBI. First image is what I'd like (but in a way more complex situation with many tables that I won't be able to explain here).

Tables are related by Project ID *:1

First table is displays the Project creation date, second table is when the materials are added (again, this is just an example which doesn't have to make sense). The slicers have to filter the first table on the creation date, and the second table on the "date added".

 

view.pngpbi.png

Hi @FrisoW ,
 
According to your description, I still don't know what you want to show with this silcer. If you just want slicer to affect two tables, you can use projnames [date of creation] to create slicer. When you use slicer to filter, the two tables will respond together, because the relationship between the two tables is 1 - * and the direction is both.

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

If I create a date slicer, it will show all projects created on that date, and the second table will show all materials for that project (on any date).

I want the second table to show all materials for whichever project falls in the date range selected in the slicer.

 

As you can see in the image below, the second table does not display anything in the May date range.

To recap, I want the slicer to show May data in both tables.

 

slicer.png

Hi @FrisoW @,

 

You can create two measures for two tables with the IF function, and then apply the measure to the visual filter.

You can refer to the pbix.

 

Best Regards,

Liang

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

Hi,

 

Years later I am trying to establish the same thing. Can't recall what the solution was with 2 measures using the IF function. I assume you don't have the PBIX any more, but do you recall the function to use?

 

Thanks

Hello, could you please reupload the pbix? It seems that the link is broken. Thanks!

That's genius, thanks a million!

V-lianl-msft
Community Support
Community Support

Hi @FrisoW ,

 

Based on your description, you have established a relationship between two tables. What is the relationship and "cross filter direction" between the two tables?

If the relationship is “1-*”and "cross filter direction" is single ,you can filter “*”table by which date column in table “1”.

If the "cross filter direction" is both, you can filter another table by date column in any table.

 

Best Regards,

Liang

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.