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
Chanleakna123
Post Prodigy
Post Prodigy

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
PattemManohar
Community Champion
Community Champion

@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 PBI Community Champion




View solution in original post

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@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 PBI Community Champion




@PattemManoharhey you're awesome 🙂 

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.