Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I would like to filter my data based on a date input. Create a slider like to determine a day in the month and use that value inside of measures.
How could I create that (the input & the ""variable"") ?
Thanks for your help
@Anonymous You would put a Date column into a Slicer visual. I believe that this is going to default to a slider where you can select a start and end time but you can change this using the little down caret icon in the upper right. Then, you can use this DAX to get the date/dates:
VAR __Min = MIN('Dates'[Date])
VAR __Max = MAX('Dates'[Date])
Thank you for the answer @Greg_Deckler .
I am trying to apply this solution, created a new table and added dummy dates inside of a column.
Here is the dax query that I am then using in order to try to filter the date:
Do you have a column called 'input date' in the input table? If that's the case, you can create a dim_calendar table and link the input table to dim_calendar table based on relationship dim_calendar [date] - fact_input[input date].
You can then add a slicer to the visual, drag and drop dim_calendar[date] to the slicer.
pbix sample: https://www.dropbox.com/s/8nzzp6mxlt4871x/filter%20test.pbix?dl=0
I do have 2 dates columns that I want to filter, but I want to filter both of them but only the day.
Would there be any way to do it ?
@fzpokg, Are both columns in the same table? It's not a typical solution, but you can link both date columns to dim_calendar table, but Power BI only allows one active relationship, the other one will be inactive. You can enable the inactive relationship via userelationship().
Here is DAX guide on userelationship()
https://dax.guide/userelationship/
Both are in the same Table, but I would like to be able to use the day number to filter on another table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |