cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

HELP !!!!Calculate %Customers

1.PNG

 

Hi everyone , i'm stuck on this . can anyone help me on this ? 

Left side table : I have MEP and MLP Customers , there're 3 MEP customers and 4 MLP Customers.

Right Side table : 2 MEP Customers who purchased the Products out of 3 MEP customers and 3 MLP Customers who purchased the products out of 4 MLP customers . 

 

my purpose , i wanna calcualate how many %Customers who purchased the products by each MEP or MLP ? 
if i filter MEP it shows the %Customers out of Total MEP Customers 

If i filter MLP it shows the %Customers out of Total MLP Customers 

 

Thx 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: HELP !!!!Calculate %Customers

@Chanleakna123  I hope you are looking for something like this.. Please try this as a "New Measure"

 

Test151 = 
VAR _Type = SELECTEDVALUE(Test151Dim[Type])
VAR _DimCnt = CALCULATE(COUNTROWS(Test151Dim),Test151Dim[Type]=_Type)
VAR _FactCnt = CALCULATE(COUNTROWS(Test151Fact),Test151Fact[Type] = _Type)
RETURN _FactCnt/_DimCnt

image.pngimage.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





View solution in original post

2 REPLIES 2
Super User
Super User

Re: HELP !!!!Calculate %Customers

@Chanleakna123  I hope you are looking for something like this.. Please try this as a "New Measure"

 

Test151 = 
VAR _Type = SELECTEDVALUE(Test151Dim[Type])
VAR _DimCnt = CALCULATE(COUNTROWS(Test151Dim),Test151Dim[Type]=_Type)
VAR _FactCnt = CALCULATE(COUNTROWS(Test151Fact),Test151Fact[Type] = _Type)
RETURN _FactCnt/_DimCnt

image.pngimage.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





View solution in original post

Highlighted

Re: HELP !!!!Calculate %Customers

@PattemManoharhey you're awesome Smiley Happy 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 45 members 763 guests
Please welcome our newest community members: