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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nanacobsbs
Helper I
Helper I

Average Dax

nanacobsbs_0-1741671556839.png

 

The matrix is shown in Fig and Dax Dommand is bellow.

Average = AVERAGE('Test'[Nov])

I would like to display the averaged results on each row, what DAX should I use?
I want the total row to have the same value as the maximum of the selected DATE numbers.

11 REPLIES 11
bhanu_gautam
Super User
Super User

@nanacobsbs , Try using

 

DAX
Average =
IF(
HASONEVALUE('Test'[DATE]),
AVERAGE('Test'[Nov]),
MAXX(ALL('Test'[DATE]), 'Test'[Nov])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you, but it does't work.

I would like to get the following calculation results.
Is it possible?

 

nanacobsbs_0-1741673623172.png

 

@nanacobsbs Try this one

 

RunningAverage =
IF(
HASONEVALUE('Test'[DATE]),
CALCULATE(
AVERAGEX(
FILTER(
ALL('Test'[DATE]),
'Test'[DATE] <= MAX('Test'[DATE])
),
'Test'[Nov]
)
),
CALCULATE(
AVERAGEX(
ALL('Test'[DATE]),
'Test'[Nov]
)
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






It doesn't work.

Dax command has some error, so I put "SUM" infromt of 'Test'[Nov]

nanacobsbs_0-1741675076533.png

 

Hi @nanacobsbs ,

can you try the below Dax query :

RunningAverage =
IF(
    HASONEVALUE('Test'[DATE]),
    AVERAGEX(
        FILTER(
            ALL('Test'[DATE]),
            'Test'[DATE] <= MAX('Test'[DATE])
        ),
        'Test'[Nov]
    ),
    AVERAGEX(
        ALL('Test'[DATE]),
        'Test'[Nov]
    )
)


If the issue persists share the sample date for better understanding.

If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

If you continue to face issues, feel free to reach out to us for further assistance!




Thank you for your comment.

I tried above DAX command, but it doesn't work like below.

 

nanacobsbs_0-1747641859731.png

 

Hi @nanacobsbs,

can you try this :

Average Display =
IF (
    ISINSCOPE('Test'[Date]),
    CALCULATE(AVERAGE('Test'[Nov])),
    CALCULATE(MAXX(VALUES('Test'[Date]), CALCULATE('Test'[Nov])))
)


 

If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

Thank you for your comment.

I tried above DAX command, but it doesn't work like below.
If the total had shown 26.77 it would have been good.

nanacobsbs_1-1747986771226.png

 

Hi @nanacobsbs ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Hi @nanacobsbs ,

Has your issue been resolved? If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.

If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!

Hi @nanacobsbs ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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