Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm trying to calculate the percentage of total using a lookup table.
The lookup table called 'Codes_Lookup' contains two columns:
[Codes] - containing the list of codes
[Desc] - containing the description of those codes
The data table called 'Data' contains several columns, one of them is called [Error Codes] and contains codes that were used for a specific unit. each cell contains only one code.
The 'Codes lookup' column [Codes] has a one to many relationship with the [Error Codes] column form the 'Data' table, its a one way relationship.
I'm trying to display the percentage of tottal of codes used in the data tables:
For this I've created the following metrics:
Count = COUNTROWS('Data')
Count All = CALCULATE([Count],ALL(Data[Error Codes]))
Solved! Go to Solution.
@Lobo1908 you need to change your measure, and assuming code lookup table has relationship with data table
Count All = CALCULATE([Count],ALL(CodeLookUpTable[Codes]))
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Lobo1908 you need to change your measure, and assuming code lookup table has relationship with data table
Count All = CALCULATE([Count],ALL(CodeLookUpTable[Codes]))
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!