Forum Discussion

some's avatar
some
New Member
3 years ago

Preset Filter buttons - how does it work

Hi, in this video the guy shows how to add preset filter buttons (1M, 3M, 6M, YTD) etc:

https://www.youtube.com/watch?v=nocsNBF_NkE 

 

For this he creates a measure that returns 1 or 0 based on the selected button and the difference from the current date and the max date in the data.

The measure is added to the chart as filter.

 

But how does it work? It only returns 1 or 0 - how does Power BI now which date row gets a 1 and which a 0. 

 

 

here is also the pibx file:

https://github.com/MarkWilcock/lbag-online/tree/master/M%26G%20Results 

 

I feel like there is a step missing but I don't find anything in his file or so. 

Thanks

Br

 

2 Replies