Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a column I need to filter. As of Now I have it like this:
I tried this but it's giving me error:
Solved! Go to Solution.
@Anonymous ,
BeforeToday_MI = IF( datevalues(Query_Util[MoveInDate]) < TODAY() && weekday(Query_Util[MoveInDate],2) <6 , True, False)
What if I want to get the days that are not Saturday or Sunday?
(My bad; I forgot to include that specification before. I need work days. Your code works perfectly; I just need to act the condition of filtering out Sunday as well.)
Hi @Anonymous ,
Did you get your problem solved? If it was solved, please mark it as a solution so that more people can find it. If not, refer to the following.
weekday(Query_Util[MoveInDate],2) return result follow the following rule.
week begins on Monday (1) and ends on Sunday (7).
If you only want filter out sunday, then weekday(Query_Util[MoveInDate],2) <7. Or enter the day you want like this:
weekday(Query_Util[MoveInDate],2) = 1 &&
weekday(Query_Util[MoveInDate],2) = 2 &&
weekday(Query_Util[MoveInDate],2) = 3 &&
weekday(Query_Util[MoveInDate],2) = 4
More detail you can refer this function.
WEEKDAY function (DAX) - DAX | Microsoft Docs
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |