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.
The user when opening the dashboard needs to see the last 2 months filtered with slicer not selected
if user select any date in slicer, then the graphic should be filtered
Solved! Go to Solution.
Hi , @Everton_Ramone
According to your description , you want to default select the last two months in your date table?
Here are the steps you can refer to :
(1)We can click "Get more visual" to add the "Preselected Slicer":
(2)We need to create a table like this:
(3)Then we can create a measure :
Measure = var _slicer_date = SELECTEDVALUE('Date'[Date])
var _max_date = MAXX(ALL('Date') , [Date])
var _last_2_month = EOMONTH( _max_date , -2)+1
var _t =SELECTCOLUMNS(FILTER( ALL('Date') , 'Date'[Date]>= _last_2_month && 'Date'[Date]<=_max_date),"Date",[Date])
return
IF(_slicer_date in _t ,TRUE(),FALSE() )
(4)Then we put thses fields on the visual and we can meet your need:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Everton_Ramone
According to your description , you want to default select the last two months in your date table?
Here are the steps you can refer to :
(1)We can click "Get more visual" to add the "Preselected Slicer":
(2)We need to create a table like this:
(3)Then we can create a measure :
Measure = var _slicer_date = SELECTEDVALUE('Date'[Date])
var _max_date = MAXX(ALL('Date') , [Date])
var _last_2_month = EOMONTH( _max_date , -2)+1
var _t =SELECTCOLUMNS(FILTER( ALL('Date') , 'Date'[Date]>= _last_2_month && 'Date'[Date]<=_max_date),"Date",[Date])
return
IF(_slicer_date in _t ,TRUE(),FALSE() )
(4)Then we put thses fields on the visual and we can meet your need:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, What is the purpose of the Dirty Slicer column and how is it used?
@v-yueyunzh-msft thanks a lot for your reply, it worked.
Is the any way you may share your contact so I can get in touch with you?
Regards
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 |
---|---|
97 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |