Forum Discussion
Anonymous
3 years agoNot applicable
Dynamic Date parameter passed to Data source
<PBI noob here> Please help! Requirement: Need only Direct Query I should have the ability to select a single date from a slicer / calendar type of visual in the report This should be passed ...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file whether it suits your requirement.
expected result measure: = IF ( HASONEVALUE ( Data[Start Date] ), MAXX ( FILTER ( Data, Data[End Date] >= MIN ( 'Calendar'[Date] ) && Data[Start Date] <= MAX ( 'Calendar'[Date] ) ), Data[X] ) )
amitchandak
3 years agoSuper User
Anonymous , if you create a measure and use that in visual or visual level filter
var _max = maxx(allselected(Date), Date[Date])
return
countx(Filter(Table, Table[Start Date] <= _max && Table[End Date] >=_max), [X])
or explore Dynamic M parameter
https://blog.crossjoin.co.uk/2020/10/25/why-im-excited-about-dynamic-m-parameters-in-power-bi/