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
Joshua_
Helper I
Helper I

I don't have daily goals.

Hi guys, I have a data table with goals (MONTHLY) and a data table with sales (DAILY). I need to calculate partial compliance. What do you suggest to me? Do I have to transform monthly goals into weekly goals? how can I do it?

image1.png 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Joshua_ ,refer if my blog on this topic can help

 

Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Joshua_ ,

Try the following formula to create measures:

Result_Sales = 
CALCULATE(
    SUM('SALES TABLE'[SALES]),
    FILTER(
        ALL('DATE TABLE'),
        'DATE TABLE'[WEEK] <= MAX('DATE TABLE'[WEEK])
    )
)
WeekCount = 
CALCULATE(
    DISTINCTCOUNT('DATE TABLE'[WEEK]),
    FILTER(
        ALL('DATE TABLE'),
        MONTH('DATE TABLE'[DATE]) = MONTH( MAX( 'GOALS TABLE'[DATE]) ) 
    )
)
_avg = 
CALCULATE(
    DIVIDE(
        SUM('GOALS TABLE'[GOALS]),
        [WeekCount]
    ),
    FILTER(
        'GOALS TABLE',
        'GOALS TABLE'[DATE].[MonthNo] = MONTH( MAX( 'DATE TABLE'[DATE] ) )
    )
)
Result_Goals = REPLACE( MAX('DATE TABLE'[WEEK]), 1, 1, "") * [_avg]
PARTIAL FUFILLMENT = DIVIDE([Result_Sales],[Result_Goals])

v-kkf-msft_0-1614740541230.png

This is my PBIX file.

https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-lazhang_microsoft_com/EWAvp8FWbrtBsSCpzgBV1E...

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Joshua_ ,refer if my blog on this topic can help

 

Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

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.