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
Anonymous
Not applicable

Average with diferent total

Hi,

Can you help me? I have issues with this measure and I don´t know the reason.

 

name1ª VISIT2ª VISITCategoryTotal result
name102/06/2021 16:2923/06/2021 14:50382,8%
name202/06/2021 19:2823/06/2021 13:36348,0%
name302/06/2021 19:2923/06/2021 16:36392,4%
name402/06/2021 19:30 39,6%
name504/06/2021 6:50 328,8%
name604/06/2021 7:40 324,0%
name707/06/2021 10:15 312,0%
name807/06/2021 10:53 13,6%
name907/06/2021 11:32 115,2%
name1007/06/2021 11:45 15,6%
name1107/06/2021 12:00 18,4%
name1207/06/2021 12:25 18,8%
name1307/06/2021 13:12 14,0%
name1408/06/2021 10:41 316,8%
name1508/06/2021 11:59 211,2%
name1608/06/2021 12:15 314,4%
name1708/06/2021 12:40 318,0%
name1808/06/2021 15:07 28,8%
name1908/06/2021 15:59 214,4%
name2009/06/2021 10:04 36,0%
name2109/06/2021 10:56 19,2%
name2209/06/2021 11:36 28,8%
name2309/06/2021 12:05 29,6%
name2409/06/2021 17:27 29,6%
name2510/06/2021 11:00 330,0%

 

The total result: has the result of the inspections.

category: is a yardstick with the importance of installation

visit: are the dates of visit and can be once or twice

name: is the name of the facility.

 

And we need a measure. Average =the average of the visit but the total is the sum of the category average / category

 

Thanks a lot in advance

 

1 ACCEPTED SOLUTION
8 REPLIES 8
Jos_Woolley
Solution Sage
Solution Sage

Hi,

You mean this?

Measure =
IF (
    HASONEVALUE ( 'Table'[Category] ),
    AVERAGE ( 'Table'[Total result] ),
    DIVIDE ( SUM ( 'Table'[Total result] ), SUM ( 'Table'[Category] ) )
)

Regards

Anonymous
Not applicable

Thank you, but not, the first part is OK

IF (
    HASONEVALUE ( 'Table'[Category] ),
    AVERAGE ( 'Table'[Total result] ),

The problem is with second.

I need also the sum average.

 

Now I am using

Total R = IF(HASONEVALUE(Table'[Name], AVERAGE( 'Table'[Total result] ), SUMX( Table, AVERAGE ( 'Table'[Total result] ) / SUM(Table[Category])).

 

I don´t Know Why?

But, Only it´s working if I filter "1 visit" by: Advanced filtering/ is no blank.

And I don´t know why I need  that filter. I don´t have any blank and only it´s working If I do the filter on "1 visit".

I have other table "Regions" and the masure it´s working ( with the filter is no Blank) in all Regions except two

Anonymous
Not applicable

"And we need a measure. Average =the average of the visit but the total is the sum of the category average / category"

 

About as clear as mud. Can you explain clearly what you need?

Anonymous
Not applicable

the average of the "category total result" and the total is the average of the "category total result" divide by category

Anonymous
Not applicable

Sorry. Same clarity as before.

Anonymous
Not applicable

Sorry, I try again

 

Now, I am using

Total R = IF(HASONEVALUE(Table'[Name], AVERAGE( 'Table'[Total result] ), SUMX( Table, AVERAGE ( 'Table'[Total result] ) / SUM(Table[Category])).

 

the average of the result: If "The Result" is 4 and there are two visit. the average is 2.

That for each row.

But the total result  I need the sum of the average, divide total category 

Anonymous
Not applicable

Thank you and I´m sorry.

 

Closed this case, and  I try again to explain it better

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.

Top Solution Authors