Forum Discussion
Transform data month to daily data
Hello I would like transform Objective data month to daily objective
| STORE | PRODUCT | DATE | OBJECTIF |
| Bayeux( France) | Salades | January 2020 | 124 |
| Bayeux( France) | Salades | February 2020 | 248 |
| STORE | PRODUCT | DATE | OBJECTIF |
| Bayeux( France) | Salades | 1 January 2020 | 4 |
| Bayeux( France) | Salades | 2 January 2020 | 4 |
| Bayeux( France) | Salades | 3 January 2020 | 4 |
| Bayeux( France) | Salades | 4 January 2020 | 4 |
| Bayeux( France) | Salades | 5 January 2020 | 4 |
| Bayeux( France) | Salades | 1 february 2020 | 8 |
| Bayeux( France) | Salades | 2 february 2020 | 8 |
Somebody could help me ? For example, I didn't write every date on january but it continues to 31 and after 1er february , 2 february , etc....
Sorry for my basic English
Thanks
Good evening GIOTTO (time France)
Thanks a lot, that's exactly what I would like. with your solution, I changed (language M) by adding data several others shops ( rail station in fact).
it was time , I used the microsoft'blog ; It's magic for a advanced beginner like me
3 Replies
- v-gizhi-msft
Community Support
Hi,
Please take following steps:
1)Create a target table:
Target table = CALENDAR(MIN('Table'[Date]),DATE(YEAR(MAX('Table'[Date])),MONTH(MAX('Table'[Date]))+1,1)-1)2)Create these columns in target table:
Days per month = CALCULATE(COUNT('Target table'[Date]),FILTER('Target table','Target table'[Month]=EARLIER('Target table'[Month])))Month = MONTH('Target table'[Date])3)Try this measure:
Measure = ROUNDDOWN ( CALCULATE ( SUM ( 'Table'[Objectif] ), FILTER ( 'Table', MONTH ( 'Table'[Date] ) = MAX ( 'Target table'[Month] ) ) ) / MAX ( 'Target table'[Days per month] ), 0 )4)The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto
- JOHN14400Frequent Visitor
Good evening GIOTTO (time France)
Thanks a lot, that's exactly what I would like. with your solution, I changed (language M) by adding data several others shops ( rail station in fact).
it was time , I used the microsoft'blog ; It's magic for a advanced beginner like me
- amitchandak
Super User
Refer if this can help you
https://www.dropbox.com/s/fnq82ksdzk1lqs3/Target_allocation_daily.pbix?dl=0