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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
bradytb
Regular Visitor

Need to return a list from 2 tables that are related

I have two tables:

Classes with CIP- Name of Class, CIP code, Vcode

VCodeList_all- Teacher name, Vcode

 

The Vcodes repeat in both tables.  Teachers can have several Vcodes on their teaching cert.  Classes also have several Vcodes that work for teaching.  

 

Classes with CIP:

Name of ClassCIP codeVcode
Plant Science010601V010601
Plant Science010601V010000
Urban Farming011201V010000
Yearbook091001V091001

 

 

 

VCodeList_all

VcodeStaff Name
V091001Elvis Presley
V010601Nancy Sinatra
V010000Nancy Sinatra
V010000Big Bopper

 

Note that the Vcodes repeat for some classes.  The idea is to have a list of teachers return when you put in a class name or list of classes when you put in a teachers name.  

 

EX:

If I type in V010000 it should return the class name that this Vcode works for 

Plant Science

Urban Farming

 

And the teachers that can teach it are:

Nancy Sinatra

Big Bopper

 

Is this even possible? 

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1721235487386.png

 

 

Jihwan_Kim_0-1721235440338.png

 

 

Staff measure: = 
CONCATENATEX (
    SUMMARIZE (
        CALCULATETABLE ( Staff_V_fct, SUMMARIZE ( Class_V_fct, V_dim[Vcode] ) ),
        Staff_dim[Staff Name]
    ),
    Staff_dim[Staff Name],
    ", "
)

 

Class measure: = 
CONCATENATEX (
    SUMMARIZE (
        CALCULATETABLE ( Class_V_fct, SUMMARIZE ( Staff_V_fct, V_dim[Vcode] ) ),
        Class_dim[Name of Class]
    ),
    Class_dim[Name of Class],
    ", "
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

ThxAlot
Super User
Super User

A bridge table is enough,

ThxAlot_0-1721237476456.png

 

ThxAlot_1-1721237500232.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

A bridge table is enough,

ThxAlot_0-1721237476456.png

 

ThxAlot_1-1721237500232.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1721235487386.png

 

 

Jihwan_Kim_0-1721235440338.png

 

 

Staff measure: = 
CONCATENATEX (
    SUMMARIZE (
        CALCULATETABLE ( Staff_V_fct, SUMMARIZE ( Class_V_fct, V_dim[Vcode] ) ),
        Staff_dim[Staff Name]
    ),
    Staff_dim[Staff Name],
    ", "
)

 

Class measure: = 
CONCATENATEX (
    SUMMARIZE (
        CALCULATETABLE ( Class_V_fct, SUMMARIZE ( Staff_V_fct, V_dim[Vcode] ) ),
        Class_dim[Name of Class]
    ),
    Class_dim[Name of Class],
    ", "
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.