Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I want to create two filters for two date columns (one representing the start year and the other representing the end year). I want to ensure that when I select a year in the start year filter, the choices available in the end year filter are greater than or equal to the selected start year. These columns are associated with query parameters.
I tried creating a measure as follows:
However, I got this message: An incompatible filter is used on a column with a parameter mapping.
I would appreciate your help.
Hi @julien310356 ,
Thanks for @amitchandak rerply.
It looks as if you already know the filtering logic, now you just need to place these two columns in two tables that are not related and create a measure as follows
Sample data
IsAfter =
IF(
SELECTEDVALUE('End Year'[End Year]) >= SELECTEDVALUE('Start Year'[Start Year]),
1,
0
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for your solutions @amitchandak and @v-heq-msft . I implemented it with some changes related to the needs of my projects (I need to have a specific date format like YYYY-MM).
However, after creating the measure such as:
isAfter = IF(VALUE(LEFT(SELECTEDVALUE('YYYY-MM (Initial)'[YYYY-MM]), 4)) < VALUE(LEFT(SELECTEDVALUE('YYYY-MM (End)'[YYYY-MM]), 4)), 1, 0)
@julien310356 , refer if this approach can help
How to use two Date/Period slicers
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |