The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello People,
I need help in creating YTD Average % Calculation.
I have created 'Current Month W/Allowance Over90 %' ,'Current Month Underbill/Overbill%' by using following DAX
Current Month W/Allowance Over90 % = DIVIDE([Current Month W/Allowance Over 90 $],[Aging],0)
Current Month Underbill/Overbill% = DIVIDE([UnderBill],[OverBill],0)
Now I need to YTD Average % calculation based on the above two calculations.
This is what I am looking for
YTD Avg W/Allowance Over90 % = Average of Current Month W/Allowance Over90 % ( This average should be from Jan to selected month)
YTD Avg Underbill/Overbill%= Average of Current Month Underbill/Overbill% ( This average should be from Jan to selected month)
Sample Pbix with current month calculations
Solved! Go to Solution.
To create the Year-to-Date (YTD) average percentage calculations based on your current measures in DAX, you can follow these steps:
Step 1: Create Measures for Current Month Percentages
Ensure you have the following measures created:
Current Month W/Allowance Over90 % =
DIVIDE([Current Month W/Allowance Over 90 $],[Aging],0)
Current Month Underbill/Overbill % =
DIVIDE([UnderBill],[OverBill],0)
Step 2: Create YTD Average Measures
Now, create the YTD average measures. These measures will calculate the average of the current month percentages from the beginning of the year up to the selected month.
YTD Avg W/Allowance Over90 % =
AVERAGEX(
DATESYTD('Calendar'[Date]),
[Current Month W/Allowance Over90 %]
)
YTD Avg Underbill/Overbill % =
AVERAGEX(
DATESYTD('Calendar'[Date]),
[Current Month Underbill/Overbill %]
)
To create the Year-to-Date (YTD) average percentage calculations based on your current measures in DAX, you can follow these steps:
Step 1: Create Measures for Current Month Percentages
Ensure you have the following measures created:
Current Month W/Allowance Over90 % =
DIVIDE([Current Month W/Allowance Over 90 $],[Aging],0)
Current Month Underbill/Overbill % =
DIVIDE([UnderBill],[OverBill],0)
Step 2: Create YTD Average Measures
Now, create the YTD average measures. These measures will calculate the average of the current month percentages from the beginning of the year up to the selected month.
YTD Avg W/Allowance Over90 % =
AVERAGEX(
DATESYTD('Calendar'[Date]),
[Current Month W/Allowance Over90 %]
)
YTD Avg Underbill/Overbill % =
AVERAGEX(
DATESYTD('Calendar'[Date]),
[Current Month Underbill/Overbill %]
)
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |