Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only

PBI get snapshot for 60 and 90 days

  • 1.  PBI get snapshot for 60 and 90 days

    Posted May 16, 2022 06:02 AM
    ​Hi,

    I'm trying to create an snapshot for 60 days and 90 days using using two dates. Receiptdate and completed date.
    I need to check if completed date is coming from 60, 90 days which the reference is Receiptdate.

    Option 1: identify if a particular records is 60 snapshot or 90 snapshot.
    Option 2: create a calculation for 60 days snapshot or 90 days snapshot.

    Below is my code for TSQL and convert to PBI code.

     case when replace(substring(convert(varchar(50),dateadd(month, 1, Receiptdate ),111),1,7),'/','-') =
         replace(substring(convert(varchar(50),completed ,111),1,7),'/','-') and fg_count = 1
        then 1.0 else 0 end Snapshot_60,

    Thanks in Advance.

    ------------------------------
    JOV Villanueva
    BI Developer
    ------------------------------