This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi there
I would like to replicate a VLOOKUP type function in Power BI.
I need to look up a column of sales order numbers to see if it has been used in the past. Currently in excel I do it as a vlookup, then eliminate double ups, copy and paste the final column into another worksheet and count this final column.
Would like to replicate all this with a measure.
Have tried to use the CONTAINS function to mimic the VLOOKUP, then hoping to DISTINCTCOUNT the result. But i don't think it wants to work in VAR/RETURN - do I have to define a measure within a measure.
Here is what I have tried
hello @maashi
please check if this will acommodate your need.
First, create a new calculated column
then create new measure
Here i tried matching up this DAX with your sample data
Also, i dont know if you provide dummy data, but the sample data you provide has wrong date format (date and month placement are switched). Please make sure your date format is correct before proceeding to next calculation.
Hope this will help you.
Thank you.
Thanks. Yes it is dummy data, plus I'm in New Zealand, we use DDMMYYYY.
I don't suppose there is a solution without creating a calculating column? I felt like I was doing it already in an extremely clumsy way in Excel, with the extra working columns, but it is much easier to add columns in excel so I just carried on with it. The dataset I will be using is quite big and growing daily so I was hoping not to add any columns in, but if there isn't, I'll definitely have a go with this solution.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 7 | |
| 6 | |
| 6 |