cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
sovereignauto
Helper III
Helper III

dateadd from Mindate

Good Afternoon,

 

I am trying to create a measure to get one month less from the Min date so: 

 

dateadd(MIN(hire[start_date]),-1,MONTH) 

 

But im getting not correct type for the Min(hire[start_date]) section.

 

How do i correct this? 

 

Thank you 

5 REPLIES 5
v-cgao-msft
Community Support
Community Support

Hi @sovereignauto ,

 

What do you expect this code to return? 

 

DATEADD returns a table with a set of dates. And the first parameter is the entity column
The full formula is what MIN(hire[start_date]) may return here is the minimum value of [start_date] in the current filtering context.

 

If you expect to return a date, try the EDATE function.

 try like:

= EDATE(MIN('hire'[start_date]),-1)

or the smallest of all dates:

= EDATE(CALCULATE(MIN('hire'[start_date]),ALL()),-1)

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

PaulDBrown
Community Champion
Community Champion

Do you have a date table?

do you need the result of the measure to be an actual date?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Yes i have a Datetable

 

the result of the measure would end up being 90% of a count of hire starts from the previous month 

PaulDBrown
Community Champion
Community Champion

What is the Min date supposed to be calculating?

What is the structure of the data?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






So i have a table of hire start dates (with other information) 

 

and im dropping months into the columns of a Matrix 

So what i want to do is get the Min of the column (so basically start of that given month) and then minus 1 month from that. 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors