Forum Discussion

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

Leave days in Cube

Hi group,

 

I have 2 fields in a cube, FromDate and ToDate and also a measure (Sum of Leave Days) to calulate the days in between the dates...(see sample table)

I would like a DAX measure to catergorise the Sum of Leave Days into 1 Day, 2 Day and 3 Days and Greater...

 

 

 

3 Replies

  • Durbslaw , new column, if possible 

     

    diff= datediff([Date from], [Date to], day)

     

    you can create a new column

    Switch(true() ,

    [diff] <= 1 , "  <= 1 Day",

    [diff] <= 2 , " 1-2  Day",

    // add other conditions 

    )

     

     

    • Durbslaw's avatar
      Durbslaw
      Icon for Helper I rankHelper I

      Hi Amitchandak,

       

      New columns and tables are out as the model won't permit those changes, I am thinking along the lines of a virtual or in memory table.

      Thanks and regards,