Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello Volks,
I have a dates table, every row represent the enddate of a week from the porject beggining
I'm using slicer to choose the period from the beggining to specific date from this column.
I had been asked to change it to dropdown list as my manager is confused what to choose from the slicer.
I tried to convert it to dropdown but when i choose a date it filter only the chosen date data, and we want it to filter a period from the project start to the selected date.
I would be thankful for any help to modify the slicer to filter a period instead of filter only the chosen date.
Solved! Go to Solution.
Hi @mohsabbah ,
You can use the slicer and sifter together.
1. Create a new table for the slicer.
Table for slicer = VALUES('Calendar'[Date])
2. New a mesure.
Filter =
VAR _selectdate =
SELECTEDVALUE ( 'Table for slicer'[Date] )
VAR _filter =
IF ( MAX ( 'Calendar'[Date] ) <= _selectdate, 1 )
RETURN
_filter
3.1 For visual that have a date field, you can use this measure for the filter.
Result.
3.2 For visual like cards, you need to modify the filtering parameters in the formula.
Total =
SUM ( 'FactSalesTable'[Sales] )
Total =
CALCULATE (
SUM ( 'FactSalesTable'[Sales] ),
FILTER (
'Calendar',
'Calendar'[Date] <= SELECTEDVALUE ( 'Table for slicer'[Date] )
)
)
The PBIX file is attached for reference.
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 @mohsabbah ,
You can use the slicer and sifter together.
1. Create a new table for the slicer.
Table for slicer = VALUES('Calendar'[Date])
2. New a mesure.
Filter =
VAR _selectdate =
SELECTEDVALUE ( 'Table for slicer'[Date] )
VAR _filter =
IF ( MAX ( 'Calendar'[Date] ) <= _selectdate, 1 )
RETURN
_filter
3.1 For visual that have a date field, you can use this measure for the filter.
Result.
3.2 For visual like cards, you need to modify the filtering parameters in the formula.
Total =
SUM ( 'FactSalesTable'[Sales] )
Total =
CALCULATE (
SUM ( 'FactSalesTable'[Sales] ),
FILTER (
'Calendar',
'Calendar'[Date] <= SELECTEDVALUE ( 'Table for slicer'[Date] )
)
)
The PBIX file is attached for reference.
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
Hello,
This is a good solution, but i have a problem that I am using live connection to dax tabular cube.
Is there a different approach not using table creation?
Ideally i would like to use dropdown slicer to pick a value and show +- 15 days of range in line chart.
I cant use range slicers.
Thank you for your help.
This worked but from slicer all days of years comes.
I only need to see Year Month in the date slicer as below. How to sort this out?
Do you know how to sort this @amitchandak
(There is PBI file in this post)
User | Count |
---|---|
111 | |
102 | |
100 | |
67 | |
35 |
User | Count |
---|---|
145 | |
141 | |
116 | |
98 | |
52 |