Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ZGardner
New Member

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. 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@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+"
  )

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@ZGardner 

could you please provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Greg_Deckler
Super User
Super User

@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+"
  )

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.