Forum Discussion
Calculate and count between 2 dates the time intervals accumulating, associating some states
good afternoon I need to calculate between 2 dates in intervals of months and be able to place at each interval a condition or value
example:
| Fecha_I | Fecha_F | State | |
| 12/2/2022 | 13/5/2022 | Made | 3 |
| 12/3/2022 | 13/5/2022 | Made | 2 |
| 13/3/2022 | Earring |
The first row the difference of months is 3 but I can not accumulate 3 months pending in that observation until the final date is completed and changed to Done, and I can not make the slopes accumulate to the other interval before the interval of performed, the same happens to me with the blank cells with Fecha_F.
Hi Syndicate_Admin ,
Calculate column :
result = DATEDIFF([Fecha_I],[Fecha_F],MONTH)Measure :Measure result = DATEDIFF(MAX('Table'[Fecha_I]),MAX('Table'[Fecha_F]),MONTH)Result:Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Syndicate_Admin ,The information you have provided is not making the problem clear to me. Can you please explain with an example?
refer if this can help
https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785
Appreciate your Kudos. - v-chenwuz-msft
Community Support
Hi Syndicate_Admin ,
Calculate column :
result = DATEDIFF([Fecha_I],[Fecha_F],MONTH)Measure :Measure result = DATEDIFF(MAX('Table'[Fecha_I]),MAX('Table'[Fecha_F]),MONTH)Result:Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.