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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

Calculated Column_Average Earned

Hi Good day, 

Can anyone pls correct my calculated Column, I want the Averge Earned per Task No. I created some but the result no the one i required.

 

1. AVE._EARNED =
AVERAGEX(
SUMMARIZE(
'S-CURVE',
'S-CURVE'[Task No.],
"Ave. Earned", AVERAGE('S-CURVE'[SUM_OF_EARNED])
),
[Ave. Earned]
)

 

RESULT=

AllanBerces_0-1711519969623.png

 

2.  

AVE._EARNED =
    AVERAGEX(
    KEEPFILTERS(VALUES('S-CURVE'[Task No.])),
    CALCULATE(SUM('S-CURVE'[DAILY_EARNED]))
)
 
RESULT=
AllanBerces_1-1711520107037.png

 

3.  CALCULATE(
AVERAGE('S-CURVE'[DAILY_EARNED]),
FILTER(ALLSELECTED('S-CURVE'),
'S-CURVE'[Task No.] = MAX('S-CURVE'[Task No.])))

 

RESULT=

AllanBerces_2-1711520224841.png

 

What i required is, the Task No. NC000135 should be blank or no value since it not  yet started.

AllanBerces_3-1711520259862.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AllanBerces ,

 

Please try:

AVE_EARNED=
VAR TaskTotalEarned =
     CALCULATE (
         SUM ( 'S-CURVE'[DAILY_EARNED] ),
         ALLEXCEPT ( 'S-CURVE', 'S-CURVE'[Task No.] )
     )
VAR TaskCountNonZero =
     CALCULATE (
         COUNTROWS ( 'S-CURVE' ),
         'S-CURVE'[DAILY_EARNED] > 0,
         ALLEXCEPT ( 'S-CURVE', 'S-CURVE'[Task No.] )
     )
RETURN
     IF ( TaskTotalEarned > 0, TaskTotalEarned / TaskCountNonZero, BLANK () )

 

After creating it, drag it to the report page for display. The page effect is as follows:

vhuijieymsft_0-1711614077069.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @AllanBerces ,

 

Please try:

AVE_EARNED=
VAR TaskTotalEarned =
     CALCULATE (
         SUM ( 'S-CURVE'[DAILY_EARNED] ),
         ALLEXCEPT ( 'S-CURVE', 'S-CURVE'[Task No.] )
     )
VAR TaskCountNonZero =
     CALCULATE (
         COUNTROWS ( 'S-CURVE' ),
         'S-CURVE'[DAILY_EARNED] > 0,
         ALLEXCEPT ( 'S-CURVE', 'S-CURVE'[Task No.] )
     )
RETURN
     IF ( TaskTotalEarned > 0, TaskTotalEarned / TaskCountNonZero, BLANK () )

 

After creating it, drag it to the report page for display. The page effect is as follows:

vhuijieymsft_0-1711614077069.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.