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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dant05
Frequent Visitor

Include data from previous date into current date

Hi, 

 

I currently have data in a previous 'Next Contact Date' field. I would now like to include all data from the 'Next Contact Date' field, where the next contact date is in the past, into today's date or the most current date. 

 

Can anybody help?

 

 

Previous dates.PNG

1 ACCEPTED SOLUTION

Hi @dant05,

 

Can you share the source data? We didn't see any NextContactDate here. The formula could be like below.

Measure =
IF (
    MIN ( Accounts[NextContactDate] ) < TODAY (),
    TODAY (),
    Accounts[NextContactDate]
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-jiascu-msft
Employee
Employee

Hi @dant05,

 

How to include? Add up? Or count, etc. ? Please follow @Greg_Deckler's suggestion tidy up the data first. If you need more support, please share a dummy sample in the original format and the expected result.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Is that your source data and is that how it is formatted? I would suggest pivoting/upivoting it.


@ 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...

The next contact data is from my source data. I'm new to Power BI but would need it to do;

 

If (Accounts[NextContactDate]) is before today's date then return todays date. 

 

Hi @dant05,

 

Can you share the source data? We didn't see any NextContactDate here. The formula could be like below.

Measure =
IF (
    MIN ( Accounts[NextContactDate] ) < TODAY (),
    TODAY (),
    Accounts[NextContactDate]
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Dale, Thanks for your measure. Seemed to work with the following;

 

NextContactDateDay = ((Accounts[NextContactDate])<TODAY (), TODAY (), Accounts[NextContactDate])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.