Forum Discussion
JOHN14400
6 years agoFrequent Visitor
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 ...
- 6 years ago
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
v-gizhi-msft
Community Support
6 years agoHi,
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
JOHN14400
6 years agoFrequent 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