cancel
Showing results for
Did you mean:
New Member

## Start date vs End Date

Hi everyone,

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

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

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)``````

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.
3 REPLIES 3
Community Support

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)``````

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

New Member

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

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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

#### Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors