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
twins2019
Frequent Visitor

MAX FOR CUSTOMER

HELLO
I HAVE THE FOLLOWING SITUATION.

 

ABCDEFGH
Customer NumberCountry (0 = No Risky; 1= Risky)Index of payment2Rating (0 = A,B; 1= C,D,E,F, no rating)Insurance limit (0 = yes insurance; 1= no insurance)(B-A) > 0 is 1 <0 is 0:RISKY OVERDU Y is 1 empty is 02total rec on cl2
AE000011001100
AE000061001000
BE000110101110
BE000110101110
BE000350101110
BE002180101110
BE002180101110
BE002180101110
BE002970101100
BE003030101110
BE003960101110
BE003960101110
BE005680101010
BE005680101010
BE005680101010
BE005690101010
BE011550001000
CA000360101110
CA001100001100

 

I NEED A FORMULA THAT GIVE ME THE SUM OF COLUMN B-C-D-E-F-G BY CUSTOMER (FOR EXAMPLE TOTAL BE00568=3) AND THEN I NEED THAT THIS SUM IS DIVIDED FOR THE COUNTING OF ALL CUSTOMERS.

 

CAN YOU HELP ME ? 

1 ACCEPTED SOLUTION

USE THE SAME MEASURE 

 

total = var total=SUM(Hoja5[B])+SUM(Hoja5[C])+SUM(Hoja5[D])+SUM(Hoja5[E])+SUM(Hoja5[F])+SUM(Hoja5[G])
var cont=COUNT(Hoja5[A])    

return
DIVIDE(total;cont)

here the result 


6.png

View solution in original post

3 REPLIES 3
santiagomur
Resolver II
Resolver II

try this creat an index in the table and this measure.

 

total = var total=SUM(Hoja5[B])+SUM(Hoja5[C])+SUM(Hoja5[D])+SUM(Hoja5[E])+SUM(Hoja5[F])+SUM(Hoja5[G])
var cont=COUNT(Hoja5[A])    

return
DIVIDE(total;cont)

6.png

i give another example

 

yes

for example i have these datas 

 

A             B C D E F G H
AE00001 1 0 0 1 1 0 0
AE00006 1 0 0 1 0 0 0
BE00011 0 1 0 1 1 1 0
BE00011 0 1 0 1 1 1 0

 

in my pivot i need a colum that give me BY customer MAX of the sum of all column B C D E F G H

here the result 

Customer Numbertotal
AE000013
AE000062
BE000114

 

and then i need another mesure that give me the SUM of this new column "TOTAL" dived by the number of the customer (in this case 9/3 

 

thanks to all

USE THE SAME MEASURE 

 

total = var total=SUM(Hoja5[B])+SUM(Hoja5[C])+SUM(Hoja5[D])+SUM(Hoja5[E])+SUM(Hoja5[F])+SUM(Hoja5[G])
var cont=COUNT(Hoja5[A])    

return
DIVIDE(total;cont)

here the result 


6.png

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.