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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
nataliesmiy1357
Helper III
Helper III

If statement in different tables

Good morning!  I would like to make an if statement as a mini filter with my data.

I have two tables that are not connected (my company won't let me connect them) - and I need to make an if statement connecting the two employee id's.

 

So if employeeid = team member employee id, I want to print the level 1 date, level 2 date, level 3 date, level 4 date, and the trainer name.

 

Please let me know what else I can do to help provide more information.  I am unable to post the pbix due to my company's restrictions.

 

 

nataliesmiy1357_0-1639588444752.png

 

1 ACCEPTED SOLUTION

@nataliesmiy1357  pbix is attached

smpa01_0-1640015265736.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

11 REPLIES 11
v-jingzhang
Community Support
Community Support

Hi @nataliesmiy1357 

 

You can use the Table feature to provide some sample data. Or prepare sample data in an Excel workbook, copy a data range and paste it in post directly. See How to provide sample data in the Power BI Forum

21122005.jpg

 

Which table does the level 1 date, level 2 date, level 3 date, level 4 date, and the trainer name come from? Does employeeid and team member employee id should be in one to one relationship? 

 

Best Regards,
Community Support Team _ Jing

There is one table with level 1 date, level 2 date, level 3 date, level 4 date, employeeid and the trainer name (the table is called TeamMember) and then there is one table with employeeid  and other data called TrainingData.

 

I want to join them on the employeeid, but the tables aren't directly connected with a relationship and I can't change it due to my companys structure.

@nataliesmiy1357  would be lot quicker and optimum for everyone if you can provide a sample data with desired output. We can very quickly get to the bottom of it.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

so, this would be the table TeamMember:

employeeidlevel1datelevel2datelevel3datelevel4dateprovider
00011/2/2021   persona
0002 1/4/2021  personb
0003  5/3/2020 persona
0004   5/4/2020personb
00051/5/2020   persona
0006  4/2/2021 personb

 

and this would be the TrainingData table

employeeidemployee NametrainingNamescore
0001TestPersonTrainingA3
0002TestPerson2TrainginB4
0003TestPerson3TrainingC2
0004TestPerson4TrainingA5
amitchandak
Super User
Super User

so, this would be the table TeamMember:

employeeidlevel1datelevel2datelevel3datelevel4dateprovider
00011/2/2021   persona
0002 1/4/2021  personb
0003  5/3/2020 persona
0004   5/4/2020personb
00051/5/2020   persona
0006  4/2/2021 personb

 

and this would be the TrainingData table

employeeidemployee NametrainingNamescore
0001TestPersonTrainingA3
0002TestPerson2TrainginB4
0003TestPerson3TrainingC2
0004TestPerson4TrainingA5

@nataliesmiy1357  pbix is attached

smpa01_0-1640015265736.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

I'm not sure how to attach a pbix.... this is close, but I don't want the max.  I want just the value.

 

So when employee id  is 0001, I want to see their level dates (all of them) with the training name.  Does that make sense?

@nataliesmiy1357  in your sample there is only one instance of level1 date

 

smpa01_0-1640016685300.png

 I am not understanding

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@nataliesmiy1357  did it resolve the issue?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

I'm a bit confused... How would I do that?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.