Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JOHN14400
Frequent Visitor

Transform data month to daily data

Hello I would like transform Objective data month to daily objective

STOREPRODUCTDATEOBJECTIF
Bayeux( France)SaladesJanuary 2020124
Bayeux( France)SaladesFebruary 2020248

 

 

STOREPRODUCTDATEOBJECTIF
Bayeux( France)Salades1 January 20204
Bayeux( France)Salades2 January 20204
Bayeux( France)Salades3 January 20204
Bayeux( France)Salades4 January 20204
Bayeux( France)Salades5 January 20204
Bayeux( France)Salades1 february 20208
Bayeux( France)Salades2 february 20208

 

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

1 ACCEPTED SOLUTION

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

 

 

View solution in original post

3 REPLIES 3
v-gizhi-msft
Community Support
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:

28.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

 

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
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.