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
edozzy
New Member

New to Power BI and stuck trying to create date measures

Hello, I'm a complete Power BI newbie and trying to get my head round some of the features and some simple functions. I've managed to set up initial data source table and run create some initial visualisations on the data in the table, but now I'd like to take next step and do some more analysis relating to dates. 

 

In my initial table called "Live Campaign List" I have two date fields: 

- Date Started Planning 

- Date Sent to Current Position 

 

I'm trying to create measures using the DATEDIFF function to calculate:

  • Power bi date difference (in days or months) between the two columns
  • Power bi date difference from today (again in days or months) 

This is probably too advanced for me, given I can't master the basic functions, but ultimately I think it would be good to determine a categorisation of risk - Red/Amber/Green based on length of time difference (ie those with longer time gap and priority level of campaign).

 

I have tried to use a DAX calcuation as follows:

 

Date Difference Interval Measure = DATEDIFF('Live Campaigns List'[Date Started Planning], 'Live Campaigns List'[Date Sent to Current Position], Day)
but I get an error message saying that in the "Date Started Planning" a single value cannot be determined. 
 
What am I doing wrong? How do I get the calculations to work?
 
Thanks in advance
 
Ed
1 REPLY 1
AnthonyGenovese
Resolver III
Resolver III

You need to create this as a calculated column. It will not work as a measure, as is. 

 

If this post was helpful, please kudos or accept the answer as a solution.
~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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