Forum Discussion

gsed99's avatar
gsed99
Helper III
8 years ago
Solved

Nested IF Statement with math on column

Hello, I want to perform an IF Statement on a column which is formatted in YYYYMM.  I have been able to do this in Excel, but new to DAX and PowerBI. Here is my formula in Excel: =IF(RIGHT(A3,2)=...
  • gsed99's avatar
    gsed99
    8 years ago

    I was able to get it to work, had to apply a FORMAT expression on the last part:

     

    DateStampMonth New = IF(RIGHT('Marketing Snapshot'[DateStampMonth],2)="01",LEFT('Marketing Snapshot'[DateStampMonth],4)-1&13,FORMAT('Marketing Snapshot'[DateStampMonth],"General Number"))