cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Average Accumulated as a measure

Hello friends.

I need to calculate the average acomulated as a measure to be able to use it in a pivoting matrix (measure), I want to have it as a measure and not creating a calculated column, please need help.

 

Best greetings.

 

1.JPG2.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Average Accumulated as a measure

@rmcneish

 

Hi, try with this measure:

 

Measure =
VAR THEORDER =
    SELECTEDVALUE ( ESPERA[ORDER] )
RETURN
    AVERAGEX (
        SUMMARIZE (
            FILTER (
                CROSSJOIN ( ALLSELECTED ( ESPERA[ORDER] ); VALUES ( ESPERA[PLANT] ) );
                ESPERA[ORDER] <= THEORDER
            );
            "AVG"; AVERAGE ( ESPERA[HOURS] )
        );
        [AVG]
    )

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

12 REPLIES 12
Highlighted
Anonymous
Not applicable

Re: Average Accumulated as a measure

Hi @rmcneish,

 

Do you need a measure for average hours per order?

Highlighted
Helper I
Helper I

Re: Average Accumulated as a measure

Hi @Anonymous

Yes, respecting the order.

 

Highlighted
Anonymous
Not applicable

Re: Average Accumulated as a measure

Hi @rmcneish,

 

Could you try Calculate(average(Table[Hours]), Groupby(Table, Table[Order]))

Highlighted
Helper I
Helper I

Re: Average Accumulated as a measure

My buddies.

I want to create a measure to use it in a matrix or different line charts. Smiley Sad3.JPG

I attach my file in One Drive.

https://tasaomega-my.sharepoint.com/:u:/g/personal/rnina_tasa_com_pe/EdkS5qs_VTVIkxHA1HV4hWABFNH1CLN...

 

Grettings.

 

@Anonymous

Highlighted
Helper I
Helper I

Re: Average Accumulated as a measure

Hi @Anonymous

I try the solution you gave me but the average is the same.

Accumulated = CALCULATE(AVERAGE(ESPERA[HOURS]),GROUPBY(ESPERA,ESPERA[ORDER]))

 

4.JPG

Highlighted
Anonymous
Not applicable

Re: Average Accumulated as a measure

Hi @rmcneish,

 

I am a little confused. If you wish to see the output as in your first screenshot, you need to remove "Plant" from the matrix. 

Highlighted
Helper I
Helper I

Re: Average Accumulated as a measure

Highlighted
Anonymous
Not applicable

Re: Average Accumulated as a measure

Hi @rmcneish,

 

Try Accumulated = ROUNDUP(CALCULATE(AVERAGE(ESPERA[HOURS]),GROUPBY(ESPERA,ESPERA[ORDER])),1)

 

and then in the modelling tab, change the format to Decimal number and decimal points to 1.

 

Is this what you need?

Highlighted
Helper I
Helper I

Re: Average Accumulated as a measure

Hi @Anonymous

Thnks for your great support and i valur so much your help, but i wish calculate the accumulated average in any selection of my filters ("#BOARD" and "PLANT").

02.JPG

 

In the next tablle I show the real calculated by all #BOATS and all  PLANTS

01.png

 

Sorry I'm annoying.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors