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
Anonymous
Not applicable

Calculate run rate and asking rate

Hi Experts,

I want to calculate activity run rate and Activity asking hrate based on current month selection from filter pane.

 

For example - if I am selecting April month from filter pane and today's date is 19/04/2020 then my no. of days will be 19.

1)  So my run rate formula will be like -

= Count(Activity in April till 19)/ 19

So this will be my run rate.

 

2) So my Asking rate formula will be like -

= ( Activity Target - Activity in April till 19 ) / ( Remaining days in April month)

 

3) If user select any other month except current month then he should get an message in expression that " Select current month only"

 

Is that possible ? Kindly help me

 

 

 

1 ACCEPTED SOLUTION

HI  @Anonymous 

You may try this simple formula:

current run rate=
DIVIDE (
    (
        [Activity Target]
            - CALCULATE ( COUNT ( 'AD_V_Activity_Detail'[Activity_Insert_At] ) )
    ),
    DAY ( TODAY () )
)

 

required run rate=
DIVIDE (
    (
        [Activity Target]
            - CALCULATE ( COUNT ( 'AD_V_Activity_Detail'[Activity_Insert_At] ) )
    ),
    DATEDIFF(TODAY(),EOMONTH(TODAY(),0),DAY)+1
)

 

Regards,

Lin

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

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Anonymous ,

Try like


Divide(([Activity Target] -CALCULATE(Count('AD_V_Activity_Detail'[Activity_Insert_At]))),datediff(eomonth('AD_V_Activity_Detail'[Activity_Insert_At],0),today(),day))

Anonymous
Not applicable

Infinity error.png

 

This error is coming with this formula -

@Anonymous , Try like


Divide(([Activity Target] -CALCULATE(Count('AD_V_Activity_Detail'[Activity_Insert_At]))),datediff(maxx('AD_V_Activity_Detail',eomonth('AD_V_Activity_Detail'[Activity_Insert_At],0)),today(),day))

Anonymous
Not applicable

Thank u so much Amit for prompt help.

 

This expression is for "Current run rate" or "required run rate" ?  because result is coming wrong

Infinity error.png

For Haryana in April -

current run rate will be (827-1)/19 = 43.47%

required run rate will be (827-1)/11 = 75.09%

HI  @Anonymous 

You may try this simple formula:

current run rate=
DIVIDE (
    (
        [Activity Target]
            - CALCULATE ( COUNT ( 'AD_V_Activity_Detail'[Activity_Insert_At] ) )
    ),
    DAY ( TODAY () )
)

 

required run rate=
DIVIDE (
    (
        [Activity Target]
            - CALCULATE ( COUNT ( 'AD_V_Activity_Detail'[Activity_Insert_At] ) )
    ),
    DATEDIFF(TODAY(),EOMONTH(TODAY(),0),DAY)+1
)

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank You So much. 

Working fine 🙂

Anonymous
Not applicable

I got below expression from community but it is not giving me MTD days if I select April 2020

 

Total NumberDaysMonth =
SUMX (
SUMMARIZE (
ADDCOLUMNS (
VALUES ( 'AD_V_Activity_Detail'[Activity_Insert_At] ),
"EOMonth", EOMONTH ('AD_V_Activity_Detail'[Activity_Insert_At] , 0 )
),
[EOMonth]
),
DAY ( [EOMonth] )
)
 
 

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.