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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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