Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
Is there any way we can restrict the dates from the Date Column in my data based on the conditions i.e., by using IF condition?
If yes, please provide me the DAX syntax.
A small illustration like:
IF(a>b, Dates> x && Dates <y)
Thanks in advance 🙂
Kashyap.
If you want to use in If and in the measure then you need use some aggregation
IF(a>b, Max(Dates)> x && max(Dates) <y)
if you in the filter you can avoid max on a date if X and Y are static
What you have done is possible in the column
refer example on my blog
Thanks for the response @amitchandak
Also, I have a table visual on which I need to filter a specific range of dates based on the selection in another date slicer, how can we do it?
I have my main table(T1) with columns including Date column, I created a duplicate of the T1 as T2 and removed every column except Date column. So when I select a value from the date column in T2, I need to get the data from the SelectedDate till SelectedDate-30 in a table visual which contains the columns from T1.
How can we achieve this ?
Thanks
Kashyap.
hi @Anonymous
When you create a measure add this conditional in the formula as below:
eg.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.