Forum Discussion

fbostan1's avatar
fbostan1
Icon for Helper I rankHelper I
4 years ago
Solved

Help with Access Formula into PowerBI Dax

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 Su...
  • tackytechtom's avatar
    4 years ago

    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/