Forum Discussion
Add a date filter following a Field Parameters slicer selection.
- 3 years ago
Thank you all
I was able to solve this issue by using the following tutorial.
https://blog.enterprisedna.co/working-with-multiple-dates-in-power-bi/
Hi LucianoB_ ,
You can create a measure as a visual-level filter.
Measure =
SWITCH (
SELECTEDVALUE ( Parameter[Parameter Fields] ),
"'Table'[Date 1]", IF ( YEAR ( MAX ( 'Table'[Date 1] ) ) = 2023, 1 ),
"'Table'[Date 2]", IF ( YEAR ( MAX ( 'Table'[Date 2] ) ) = 2023, 1 )
)
Put this measure into the filters, set up show items when the value is 1.
Here're the results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LucianoB_3 years agoFrequent Visitor
Thank you so much Anonymous, I realy appreciate your help.
That worked very well with the full date, however I am using Month on the Paramenter Field ('Table'[Date 1].[Month]), and the filter is returning blank.
I took your sample file and added a 2nd Parameter:
Parameter2 = { ("[Date 1].[Month]", NAMEOF('Table'[Date 1].[Month]), 0), ("[Date 2].[Month]", NAMEOF('Table'[Date 2].[Month]), 1) }Here are the results:
This is what I am trying to achive:
Thank again for your help.