March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have 3 tables are Data, Report and Priority.
In Data table contains duplicate items with unique code and qty, report table contain unique item only and Priority table contain order for the code.
In data table the same item has two different codes are "CHE" and "RCB" so I would like to pull the code and qty against code "CHE" only that's my first priority and there is no "CHE" then pick from "RCB" that's secound priority.
In data table the items has duplicate with code so I created two different columns in data table (count, Unique count) to get the unique count for code against the items.
and finally I used lookupvalue function to bring the code and qty against the item in report table by using below mentioned formula
Link here for PBI file https://www.dropbox.com/s/9xoyhnqthp5td3y/LOOKUPVALUR-MES%26CAL-28-07-22.pbix?dl=0
Power BI likes data models in star or snowflake format. Dimensions on the outside, facts in the middle. Your tables are a mix of facts and dimensions. I would recommend you rethink and refactor your data model to separate dimensions from facts.
LOOKUPVALUE is something you use between unrelated tables. In a good data model you don't need to use that, let the data model do the work for you. Worst case use TREATAS.
Thanks for your reply.
Can I get a measure for similar to the calculate column logic. I am trying to bring it column in measure but its supporting.
That's the raw data so its difficult to change the date but I try it.
Thanks for your reply and solution and I am aware of the options.
I want the same result within the same same column by using DAX code(New calculate column and measure) without duplication column in data table.
I am currently achieving the result by using lookvalue function with adding the support columns in data table. I am trying to avoid the option and looking for alternative solutions.
Thank you.
"I want the same result within the same same column "
Can't help you with that. I think it's not a good design. Maybe someone else can chime in.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |