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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jjmao
New Member

how to use vlookup in power bi

Hello everyone

 

I have a sale data and in excel, i use vlookup to calculate the percent of member type who had purchased.

Is it possible to do the same in power bi? I am stuck, can anyone advice? 

 

https://drive.google.com/file/d/1JQhCMuJObYubhM15_NyIltrGlIt4l9LS/view?usp=sharing

Many thanks 🙏

1 ACCEPTED SOLUTION

@jjmao 

i created a column in sales table

Column = LOOKUPVALUE('Member Database'[Membership Code],'Member Database'[MembershipID],Sales[MembershipID])

1.PNG

there are 10 records and two duplicated members. So the result for distinctcount is 8





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
vanessafvg
Super User
Super User

you can create a calc like this

 

% Member Type 2 =
var totalsales = CALCULATE(sum(Sales[Amt spend]), all(Legend))
var salesamt = CALCULATE(sum(Sales[Amt spend]))
var ratio = DIVIDE(salesamt, totalsales,0)
return ratio




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg 
actually i dont need the sales amount.

 

i trying to find out for the april sales, example.

In the sale data, there are 9 VIP who make purchase. 

In the member database, there are total of 26 VIP

So total percent who VIP who made purchase =35%

 

Is that possible? thank you very much 🙂

@jjmao 

pls try this

Measure = distinctcount(Sales[MembershipID])/COUNTROWS('Member Database')

1.PNG





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

Proud to be a Super User!




@ryan_mayu 

hello.

I tried the formula but the percent is different when done in excel?

for example: 

9 VIP made purchase & there are total of 26 VIP

So total percent made purchase =35%

@jjmao 

i created a column in sales table

Column = LOOKUPVALUE('Member Database'[Membership Code],'Member Database'[MembershipID],Sales[MembershipID])

1.PNG

there are 10 records and two duplicated members. So the result for distinctcount is 8





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

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors