Forum Discussion

ZGardner's avatar
ZGardner
New Member
5 years ago
Solved

30/60/90

Hello, I apologize in advance for this seemingly ignorant question. I am new to PowerBI and have been tasked with creating a visualization for a specific dataset. My issue is that I need to take a single column with dates (DEADLINE) and denote how many of these dates are 30 days away/60 days away and 90 days away.

 

I've tried other solutions posted on the boards but have had little success in accomplishing exactly what I am trying to do.

 

Thanks for your help in advance. 

  • ZGardner Easiest would be to do something like the following:

    Days Away Column = 
      VAR __Days = (TODAY() - [DEADLINE]) * 1.
    RETURN
      SWITCH(TRUE(),
        __Days <= 30,"30",
        __Days <= 60,"60",
        __Days <= 90,"90",
        "90+"
      )

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    ZGardner Easiest would be to do something like the following:

    Days Away Column = 
      VAR __Days = (TODAY() - [DEADLINE]) * 1.
    RETURN
      SWITCH(TRUE(),
        __Days <= 30,"30",
        __Days <= 60,"60",
        __Days <= 90,"90",
        "90+"
      )