Forum Discussion
Dynamic Filter Based on Slicer Selection
Hello experts, need help solving a puzzle. Thank you muchly in advance for any help. Relatively new to Power BI.
I have a simple model. A large fact table, and a date dimension. As you can see in the Viz below, I have a slicer based on the SHD Date YearMonth field (numeric). Selection can filter the History table with no issue, but what I need to achieve is when a selection is made, I need to filter on two values: one selected, and another one calculated. For example, if a user selects 202102, I need it selected but also 202012 chosen as well. Basically, it's 202102 - 100. I can not, for the life of me, write a dax statement which would allow me to use two values - one selected, and one calcualated via the slicer. HELP??? 😞
Hi irakhman ,
Try to use DATESINPERIOD function. Here are some samples you can refer to:
Display Last N Month and Selected Month Data using Date Dimension in Power BI (helicaltech.com);
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- IceyCommunity Support
Hi irakhman ,
Try to use DATESINPERIOD function. Here are some samples you can refer to:
Display Last N Month and Selected Month Data using Date Dimension in Power BI (helicaltech.com);
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.