The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have two tables related with each other with an ID number (many to one). From the one side I want to check in the column of the many table if the ID exists in this table (specific column). If the ID is there, the ID is packed. If the ID is not in the table, the ID is unpacked.
I checked historical solutions related to the problem, but could not find the solution unfortunately.
Can somebody help?
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario.
OneSideTable:
ManySideTable:
Relationship:
Then You may create a measure as follows.
Ispacked =
IF(
COUNTROWS(
RELATEDTABLE(ManySideTable)
)>0,
"packed",
"unpacked"
)
Finally you may use a table visual to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for you help. However I get no detailed view of packed lines. ID's are empty (on both formulas you suggested). Data link is based on direct query.
@Anonymous try this measure
Measure Packed =
IF ( COUNTROWS( ManySideTable ) == BLANK(), "Not packed", "Packed" )
drop ID from parent table and above measure in a table visual and you will have the solution
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.