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
@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
User | Count |
---|---|
134 | |
62 | |
57 | |
57 | |
46 |
User | Count |
---|---|
130 | |
62 | |
58 | |
56 | |
50 |