Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

YTD Average % Calculation

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 

 
I have attached the sample Pbix.
 
Any help would be really appreciated.
 
Thanks,
Fareed.
  • 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 %]
    )

1 Reply

  • 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 %]
    )