cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PepeB Frequent Visitor
Frequent Visitor

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

Accepted Solutions
PepeB Frequent Visitor
Frequent Visitor

Re: Gather information from different tables by multiple condition in many tables

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
Super User
Super User

Re: Gather information from different tables by multiple condition in many tables

@PepeB 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.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





PepeB Frequent Visitor
Frequent Visitor

Re: Gather information from different tables by multiple condition in many tables

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

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)