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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gigi97
Regular Visitor

arithmetical average

Hello,
I built this dax formula to calculate the average. to prevent it from changing for each row I inserted all. I then filtered by incremental to get an average based on incremental only. However, I would also like the average to change based on the year I select as the filter. Only the way I set it up doesn't work CALCULATE((AVERAGEX(ALL('TABEL COMPLETED'), 'TABEL COMPLETED'[GM LC/KG])),'TABEL COMPLETED'[Scenario]="Incremental")
how can i do this?
thank you

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @gigi97 ,

Please have a try.

Create a measure.

measure =
AVERAGEX (
    FILTER (
        ALL ( table ),
        table[scenario] = "Incremental"
            && table[year] = SELECTEDVALUE ( table[year] )
    ),
    table[GM LC/KG]
)

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.