Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am having an issue with a model. I have five tables that need to be linked using an ID, which works fine. But in addition, I would like to have a general Date filter that filters all those five tables at once.
Note that I can't create a second relationship using the Date columns, because I need my ID relationships to go both ways. The second relationship creates ambiguity. Here is the model:
An advice I got was to filter dates in every measure I create using DAX. for example:
Does anyone know a way to get around this problem?
Thanks a lot, and happy new year.
Solved! Go to Solution.
Hi @Anonymous ,
According to my understanding, you want to use Date for Slicer to filter all other tables when there are relationships among the other tables but no between Date table and the others, right?
Please try to use the following formula and then apply it(set as "is 1") to all visuals:
Measure =
VAR _min =
MIN ( 'Date'[Date] )
VAR _max =
MAX ( 'Date'[Date] )
VAR _idTab1 =
SUMMARIZE (
FILTER (
ALL ( 'Table1' ),
MAX ( 'Table1'[Date] ) >= _min
&& MAX ( 'Table1'[Date] ) <= _max
),
[ID]
)
RETURN
IF ( MAX ( 'Fact'[ID] ) IN _idTab1, 1, 0 )
The final output is shown below:
Here is the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.
Best Regards,
Eyelyn Qin
Thanks @Anonymous,
I had to adapt your formula because I want the tables to be each filtered by date, independently of IDs.
So I used this formula as a filter in each visual and it does the job:
Thanks for your replies.
Regards.
Hi @Anonymous ,
According to my understanding, you want to use Date for Slicer to filter all other tables when there are relationships among the other tables but no between Date table and the others, right?
Please try to use the following formula and then apply it(set as "is 1") to all visuals:
Measure =
VAR _min =
MIN ( 'Date'[Date] )
VAR _max =
MAX ( 'Date'[Date] )
VAR _idTab1 =
SUMMARIZE (
FILTER (
ALL ( 'Table1' ),
MAX ( 'Table1'[Date] ) >= _min
&& MAX ( 'Table1'[Date] ) <= _max
),
[ID]
)
RETURN
IF ( MAX ( 'Fact'[ID] ) IN _idTab1, 1, 0 )
The final output is shown below:
Here is the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello!
I just stumbled upon the same problem, but sadly cant open the pbix file you attached, I went through the process, used this code as per the last reply :
Thanks a lot !
@Anonymous , Ideally, you should be able to join with date table, all these 5. Make some bi-directional joins as single directional and that will work.
Or try measure like
Distinct.count =
var MinDate = minx(allselected(DateTable), DateTable[Date])
var MaxDate= maxx(allselected(DateTable),DateTable[Date])
var val = values(AsRun[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(AsRun[TV Link]);
Filter(AsRun; AsRun[Date] >= MinDate && AsRun[Date] <= MaxDate))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
40 |