Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have to add custom column called "last week" with the following expression :
(departure_ >= date_add(current_date(), -$Weeks (4)*7) and departure<current_date())
Can someone please help me with dax expression.
Thanks in advance.
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
IF(
MAX('Table'[Departure])>=TODAY()-28&&
MAX('Table'[Departure])<TODAY(),
1,0
)
Then you may put the measure in the visual level filter to filter the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
IF(
MAX('Table'[Departure])>=TODAY()-28&&
MAX('Table'[Departure])<TODAY(),
1,0
)
Then you may put the measure in the visual level filter to filter the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
could you please describe the exact logic of your calculation? What are you trying to achieve? Would this be an IF statement? It's easier to help if you can provide us with more context/background a sample dataset even?
@Anonymous , for week on week, refer my blogs of video
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Hi @amitchandak,
I am unable to understand that.But here i want how to find current_date and week.
Thank you
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.