Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need help with this formula I have from Access which I want to convert it into PowerBI Dax.
Access formula =IIf(Weekday(Date()) Between 2 And 3,Date()-4,Date()-2)
Numbers for weekdays Sunday =1 Monday =2 Tuesday =3 Wednesday=4 Thursday =5 Friday =6 Saturday =7
Solved! Go to Solution.
Hi @fbostan1 ,
Not sure about the Access syntax, but I'll give it a try:
TomsCalculatedColumn =
IF ( WEEKDAY('date'[Dates] ) = 2 || WEEKDAY('date'[Dates] ) = 3, 'date'[Dates] -4, 'date'[Dates] -2 )
I assumed that "Date()" is a date column.
If "Date()" is a function for today's date, then you can use this one:
TomsMeasure =
IF ( WEEKDAY(TODAY() ) = 2 || WEEKDAY(TODAY() ) = 3, TODAY() -4, TODAY() -2 )
Hope this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Awesome! worked perfectly, thank you so much!
I also need help with this, I want to write a Dax formula for
(If ORDR_DATE is between Rx Direct and Rx Direct End then "Y" else "N")?
Hi @fbostan1 ,
Not sure about the Access syntax, but I'll give it a try:
TomsCalculatedColumn =
IF ( WEEKDAY('date'[Dates] ) = 2 || WEEKDAY('date'[Dates] ) = 3, 'date'[Dates] -4, 'date'[Dates] -2 )
I assumed that "Date()" is a date column.
If "Date()" is a function for today's date, then you can use this one:
TomsMeasure =
IF ( WEEKDAY(TODAY() ) = 2 || WEEKDAY(TODAY() ) = 3, TODAY() -4, TODAY() -2 )
Hope this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
98 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |