Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am new to DAX, just received a two days training overall on PBI after a few months struggling for basically anything related to DAX.
My Data model contains several fact tables. One table with 'FactA'[Date] data in 2024, another with 'FactB'[Date] only up to 2023.
I want to create a page specific to the 'FactB' (max 2023).
I also want to calculate anything using my Date table to keep it at the center of any calculation involving dates.
If I create a segment with 'Date'[Date], I will have 2024 has the max date.
For instance I have several measures :
Solved! Go to Solution.
see attached.
NOTE1 : This is a measure filter on a visual. If your data sources are in import mode you could add a calculated column to the calendar table instead and make it a page or report filter.
NOTE2 : You are comparing filter context to scalar value. I chose the MIN aggregation to include the entire filter context. You could use MAX instead to cut off exactly at the date.
What's preventing you from using the filter pane "Filters on this page" ?
Nothing is preventing me from using it except the way to use it or my skill.
Which measure should I put there? 'MaxYear' ?
Which criteria should I set on that measure? 'less than' what ?
I am looking for a dynamic solution. I don't want to set a constant otherwise I will have to change it (or the user) as soon as there will be data in 2024.
I am preparing an example.
In parallel I will add a flag in my date table to tag all dates where there is data in FactB. I will filter on that tag afterward.
Here is the example.
In page ViewAll, no filter. In page View B, I filtered manually with date less than 2024. I wish to to make that filter automatic to max FactB[Date].
see attached.
NOTE1 : This is a measure filter on a visual. If your data sources are in import mode you could add a calculated column to the calendar table instead and make it a page or report filter.
NOTE2 : You are comparing filter context to scalar value. I chose the MIN aggregation to include the entire filter context. You could use MAX instead to cut off exactly at the date.
Thank you for the measure. It helped to save some time instead of figuring it out by myself.
I added it to my calendar table, and after fixing my dates columns it worked nicely as a filter.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |