Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello all,
May i know how to write a DAX for Run Rate = ( Total Net Sales/9 month)*12 in power BI?
i would like the date is automate means if going oct so the total run rate will calculate (total net sales/10month)*12.
Solved! Go to Solution.
Hi @Anonymous ,
Here I create a sample to have a test. I suggest you to create a Calendar table to help your calculation.
Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthShortName",FORMAT([Date],"MMM"))
Data model:
Measure:
Net Sales = CALCULATE(sum('Table'[Value]))
Running Rate =
VAR _LASTMONTH =
CALCULATE (
MAX ( Calendar[Month] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Year] = MAX ( 'Calendar'[Year] )
&& [Net Sales] <> 0
)
)
VAR _Total =
CALCULATE ( [Net Sales], ALLEXCEPT ( 'Calendar', 'Calendar'[Year] ) )
RETURN
DIVIDE ( _Total, _LASTMONTH ) * 12
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Here I create a sample to have a test. I suggest you to create a Calendar table to help your calculation.
Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthShortName",FORMAT([Date],"MMM"))
Data model:
Measure:
Net Sales = CALCULATE(sum('Table'[Value]))
Running Rate =
VAR _LASTMONTH =
CALCULATE (
MAX ( Calendar[Month] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Year] = MAX ( 'Calendar'[Year] )
&& [Net Sales] <> 0
)
)
VAR _Total =
CALCULATE ( [Net Sales], ALLEXCEPT ( 'Calendar', 'Calendar'[Year] ) )
RETURN
DIVIDE ( _Total, _LASTMONTH ) * 12
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, I need the same but for month
for example
in excel I have the formula
%compliance/daysworked*days of the month
in excel I have the formula
% compliance/days worked*days of the month
I try to do the same in power bi but is not working.
Can you help me please.
@Anonymous , Use of function average or averagex should work in this case. Otherwise provide data in tabular form.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |