Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have two dimension tables which i use as filters, Year filter and Month filter.
When i select a specific year like 2022 or 2023, then month filter should show only December and in the remaining cases it should show all the months.
Any suggestion would be of great help..!
You can achieve this by creating a new calculated column in your Month table that depends on the selected value in the Year filter. Here’s a step-by-step guide:
Here’s a sample DAX formula for the calculated column:
FilteredMonth = VAR SelectedYear = SELECTEDVALUE('Year'[Year], "All") RETURN IF( SelectedYear IN {"2022", "2023"}, IF('Month'[Month] = "December", "December", BLANK()), 'Month'[Month] )
In this formula, if the selected year is either 2022 or 2023, it checks if the month is December. If it is, it returns “December”, otherwise, it returns a blank value which effectively filters out the other months. If the selected year is not 2022 or 2023, it returns all months.
After creating the FilteredMonth column, use it in your visuals or tables instead of the original Month column. Also, make sure to use this new column in your Month filter.
Please note that this solution assumes that you have a single select filter for the Year. If you allow multiple selections for the Year filter, you might need to adjust the formula to handle multiple years. Also, remember to refresh your data after making these changes to see the effect.
I hope this helps! Let me know if you have any other questions. 😊
Calculated columns can't (should not) be created from measures or filters.
Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?
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 |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |