cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Start date vs End Date

Hi everyone, 

 

Can you please help me with a measure that calculates using the following logic?

 

Ex11.png

 

 

 

 

 

 

 

 

 

 

 

I dont necessary needs a specific month as the example, Id like to show the data in a Table using the months/quarters/years from a Calendar Table where I can see the % of projects that starts in one month and ends in another one!

 

Thank you!

 

 

1 ACCEPTED SOLUTION
Community Support
Community Support

Hi @chdelgado ,

You can create a measure as below:

Measure = 
VAR _cursdate=MAX('Table'[Fecha Inicio])
VAR _startinsmonth= CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)))
VAR _startendnotinsmonth = CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)&&MONTH('Table'[Fecha Fin])<>MONTH(_cursdate)))
RETURN 
DIVIDE(_startendnotinsmonth,_startinsmonth)

Start date vs End Date.JPG

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

Community Support Team _ Rena
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

3 REPLIES 3
Community Support
Community Support

Hi @chdelgado ,

You can create a measure as below:

Measure = 
VAR _cursdate=MAX('Table'[Fecha Inicio])
VAR _startinsmonth= CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)))
VAR _startendnotinsmonth = CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)&&MONTH('Table'[Fecha Fin])<>MONTH(_cursdate)))
RETURN 
DIVIDE(_startendnotinsmonth,_startinsmonth)

Start date vs End Date.JPG

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

Community Support Team _ Rena
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

Super User IV
Super User IV

@chdelgado , Try measures like

 

% ended in same Month = divide(countx(filter(Table, eomonth([start date],0)= eomonth([end date],0)),Table[Task]), count(Table[Task]))


% ended in different Month = divide(countx(filter(Table, eomonth([start date],0)= eomonth([end date],0)),Table[Task]), count(Table[Task]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

I tried with your measures and worked in some way, now it is giving me the right result, however if I list the tasks on a table, it is not showing me the ones that were not completed the same month, only the ones that did.

This is the data model, maybe you can have a better idea with this

https://1drv.ms/x/s!Ag7DnkvMsR95szrMjdViLqwnK5NT?e=FQZdMw

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

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

Top Solution Authors
Top Kudoed Authors