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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Gather information from different tables by multiple condition in many tables

Hi all,

 

I've conected power bi to our SQL server. And I'm trying to gather the historic changes with its timestamps. this are stored in called snapshots tables. Problem that are different snapshot tables and the Key one "commandsnapshots" has no relations within the SQL server. My guess is that all the gathering work is hardcoded to avoid redundant relationships between tables.

That means that I should code that in power BI. I tried to do it by merging tables but there are so many tables to megre that the resulta hasn't been really productive.

 

My approach to it was to creat a DAX column that gathers de dates with If and lookupvalue sentences. This will mean a huge contatenated If sentences becase there are 49 different commands.

I was wondering If there's a more efficient way to do multiple lookupvalues with multiple condictions. I've been searching around the forum but didn't find a solution for me.

 

I'll show you just one of the examples. See image below:

Capture.PNGWhat I'm looking is to get a column named "Date" in CommadSnashot table that contains the Batches[CreationDate] if CommandTypeKey[CommandType] = 5... and so on with multiple commandTypes gathering dates from different tables. If that makes sense.

 

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi

I'm sorry about it. Thanks I could solved it as finnaly it wasn't as complex as I thought.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@Anonymous your requirement is not fully clear, and the image is so small to understand the diagram. Can you put some sample data in excel sheet and expected output and share that file to understand the problem.



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.

Anonymous
Not applicable

Hi

I'm sorry about it. Thanks I could solved it as finnaly it wasn't as complex as I thought.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.