Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi I am trying to figure out how to use an unbound Date Picker, to use in custom logic in order to create a measure that filters a table.
The problem we are running into is we seem to be unable to get the selected value from the slicer, instead only being able to get the minimum value from the table that matches that slicer.
In pseudo code essentially I want to be able to create measures minDate = Slicer.MinValue and maxDate = Slicer.MaxValue, and then be able to use those measurers in more complex logic in order to create a filter on the Table.
Instead the only possible way it seems to work is to have the Table values go into the Slicer, then we pick the Min and Max dates of the Table as filtered by the Slicer, but I don't necessarily want those filters applied, I want to use those values in my own more complex filters.
Is this possible? Is there anyway using DAX to be able to directly access values on an unbound DatePicker, or some other work around? I tried creating a seperate data source for use in the Slicer but frankly it's still not exactly a nice solution and I feel like I have to be missing something.
Solved! Go to Solution.
Hi @lnoymous ,
Clear. 🙂
Here MIN() and MAX() return the maximum and minimum values of 'Table' [Date] in the current filtering context, not the values displayed on the slicer. Currently, there is no method to recall the values displayed on the slicer. As you did before, you need to prepare a continuous table of dates for the slicer to ensure that the displayed values are present in the current filtering context.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @lnoymous ,
// but I don't necessarily want those filters applied, I want to use those values in my own more complex filters.
If you don't want the slicer to interact with other visuals, you can select the slicer and edit the interaction. This way the slicer becomes a method for getting arguments.
Change how visuals interact in a report
then use the slicer and get the values on the slicer through MIN() and MAX().
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
then use the slicer and get the values on the slicer through MIN() and MAX().
Are you referring to gettin gthe underlying data from the datasource attached in the slicer or directly from the slicer yourself?
What I am trying to find out is I have a Date Range Slicer as such
It allows you to pick a custom range that is not necessarily in your data set.
I don't want to do MIN('Table'[Date]) and get back the closest matching date which could be let's say 6/10/2015. I'd want to get the exact values from the Slicer itself (per image above it would bve 6/4/2015).
If there is a way to directly get the value from the Slicer as opposed to the underlying source could you share an example of that as I have been unable to find anyway to do that thus far.
Hi @lnoymous ,
Clear. 🙂
Here MIN() and MAX() return the maximum and minimum values of 'Table' [Date] in the current filtering context, not the values displayed on the slicer. Currently, there is no method to recall the values displayed on the slicer. As you did before, you need to prepare a continuous table of dates for the slicer to ensure that the displayed values are present in the current filtering context.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |