Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Team,
I am new to power bi.
Kindly please help me below dax issue with date dropdown filter.
Like, Today date with Text Data Type
Last 7 days with Text Data Type
and Future dates with Date Data Type.
Kindly please he me on this case. I need to go all above cases in one dropdown filter. please help me best approch?
Solved! Go to Solution.
Hi @Ayyappa5678 ,
I created some data:
Are you referring to the selection of the slicer to display the corresponding date.
Table1:
Table2:
Here are the steps you can follow:
1. Create measure.
Flag =
var _select=SELECTEDVALUE('Table'[Slicer])
var _today=TODAY()
return
SWITCH(
TRUE(),
_select="Today"&&MAX('Table 2'[Date])=_today,1,
_select="Last 7 dates"&&MAX('Table 2'[Date])>=_today-7&&MAX('Table 2'[Date])<_today,1,
_select="future dates"&&MAX('Table 2'[Date])>_today,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Ayyappa5678 ,
I created some data:
Are you referring to the selection of the slicer to display the corresponding date.
Table1:
Table2:
Here are the steps you can follow:
1. Create measure.
Flag =
var _select=SELECTEDVALUE('Table'[Slicer])
var _today=TODAY()
return
SWITCH(
TRUE(),
_select="Today"&&MAX('Table 2'[Date])=_today,1,
_select="Last 7 dates"&&MAX('Table 2'[Date])>=_today-7&&MAX('Table 2'[Date])<_today,1,
_select="future dates"&&MAX('Table 2'[Date])>_today,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I think it can be achieved using
"detect data type" option in" transform" tab of "power query editor"me.
No it is not working we will go with dax commands.
please suggest with DAX command!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |