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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Alex_G7
Helper I
Helper I

How In Total of matrix display average of column defined as measure

Hi, 

I have measure 

% Perf Inc =
IF(NOT(ISBLANK([Measure1])),1-[Measure1]) -- formatted as percentage

I created Matrix 

Alex_G7_0-1618263865722.png

I want in Total dispaly average =  88.9%

Thank you

 

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Alex_G7

 

You can try measure as:

Measure=
var a = 
IF(NOT(ISBLANK([Measure1])),1-[Measure1])
var b = averagex()// Expressions that you expect to total
Return
 IF(
    HASONEVALUE([RESPONSABLE]),
    a,
    b
   )

You can refer: https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax

 

Best Regards,

Link

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @Alex_G7

 

You can try measure as:

Measure=
var a = 
IF(NOT(ISBLANK([Measure1])),1-[Measure1])
var b = averagex()// Expressions that you expect to total
Return
 IF(
    HASONEVALUE([RESPONSABLE]),
    a,
    b
   )

You can refer: https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax

 

Best Regards,

Link

selimovd
Super User
Super User

Hello @Alex_G7 ,

 

the value in the cell for total will give back 1-[Measure1].

To be honest I don't have any clue how the [Measure1] looks like, so I don't know if the result makes sense.

But if you want to give back a different result for the total try the ISINSCOPE function:

% Perf Inc =
IF(
    ISINSCOPE( myTable[RESPONSABLE] ),
    IF(
        NOT (
            ISBLANK( [Measure1] )
        ),
        1 - [Measure1]
    ),
    1 - AVERAGE( [Measure1] )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

% Perf Inc =
IF(
ISINSCOPE( myTable[RESPONSABLE] ),
IF(
NOT (
ISBLANK( [Measure1] )
),
1 - [Measure1]
),
1 - AVERAGE( [Measure1] )
)

 

The AVERAGE function only accepts a column reference as the argument number 1.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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