Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a slicer where user can select one month from a dropdown list as start month.
I would need to add the selected month number as a fixed value as a calculated column.
this is my Start_month table, and in the "Selected" calculated column I would like to see 3 for each row
how could I create that column?
Solved! Go to Solution.
Hi @bsz412 ,
I just created a table with Date column to test.
And we need to create three tables for three slicers with all Year/ all Months:
Then please create a flag measure, and apply it to visual-filter pane, set as "is 1"
Filter Flag =
var _minDate=DATE(MIN('Year slicer'[Year]),MAX('Start Month'[Value]),1)
var _maxDate=DATE(MAX('Year slicer'[Year]),MAX('End Month'[Value])+1,1)
RETURN IF(MAX('Table'[Date]) >=_minDate && MAX('Table'[Date])<_maxDate,1,0)
The original table will be filtered between 2020/7/1- 2021/2/28:
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 @bsz412 ,
I just created a table with Date column to test.
And we need to create three tables for three slicers with all Year/ all Months:
Then please create a flag measure, and apply it to visual-filter pane, set as "is 1"
Filter Flag =
var _minDate=DATE(MIN('Year slicer'[Year]),MAX('Start Month'[Value]),1)
var _maxDate=DATE(MAX('Year slicer'[Year]),MAX('End Month'[Value])+1,1)
RETURN IF(MAX('Table'[Date]) >=_minDate && MAX('Table'[Date])<_maxDate,1,0)
The original table will be filtered between 2020/7/1- 2021/2/28:
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.
@Anonymous OMG, this is great, thank you so much!
Hi @bsz412 ,
My initial thought was that this shouldn't be possible because the values in the calculated column are updated during a data refresh. This means any time your selection in the report would change, the value in the calculated column will not update.
Here they discussed this issue:
Solved: Using Slicer values in a calculated column - Microsoft Power BI Community
And here another suggestion for a solution:
Power BI calculated column based on Slicer - deBUG.to
Does this help? 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Hi @tackytechtom,
Thanks for the clarification. The reason why I was trying this, is because I have to build a period slicer that looks like this
They insist so hard, so building something else instead is unfortunately not an option. I was hoping that capturing the start year&month combo and end year&month in a measure can somehow help me filter the calendar table to the values that fall in between those 2 values.
Right now I have no idea how will I create this format 😞
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.