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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
OlegV
Helper III
Helper III

create a table visual based on 2 tables (no calculated columns, tables or relationships)

Hello,
I have two power bi dax tables. 

I need to create a table visual. In which the first column is 'Sales Orders'[Sales Order], the second column is 'WiPJobs'[Job].

I cannot create new caculated tables, calculated columns or relationship between these tables.

I tried to use lookup and selected value functions, but there are several 'WiPJobs'[Job] for one 'Sales Orders'[Sales Order].

Could you please advise any solution. Thank you.

Here is pbix file, on my Onedrive  sample.pbix

or codes

SalesOrders = DATATABLE(
"Sales Order",STRING,

{
{"A"},
{"B"},
{"C"},
{"D"}
}
)


WIPJobs = DATATABLE(
"Sales Order",STRING, "Job",STRING,
{
{"A","A1"},
{"A","A2"},
{"B","B1"},
{"C","C1"},
{"C","C2"},
{"C","C3"},
{"D","D1"}
})

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@OlegV Try:

Measure = 
    VAR __SO = MAX('SalesOrders'[SalesOrder])
    VAR __Result = CONCATENATEX( FILTER( 'WIPjobs', [SalesOrder] = __SO ), [Job], ", " )
RETURN
    __Result

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-tangjie-msft
Community Support
Community Support

Hi @OlegV ,

 

Thank you @Greg_Deckler  for the quick response and solution. In addition to creating a measure, we can also create a new table.

 

NewTable =
ADDCOLUMNS (
    'SalesOrders',
    "Job",
        CONCATENATEX (
            FILTER ( 'WIPJobs', [Sales Order] = EARLIER ( 'SalesOrders'[Sales Order] ) ),
            [Job],
            ","
        )
)

vtangjiemsft_0-1710223668867.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @OlegV ,

 

Thank you @Greg_Deckler  for the quick response and solution. In addition to creating a measure, we can also create a new table.

 

NewTable =
ADDCOLUMNS (
    'SalesOrders',
    "Job",
        CONCATENATEX (
            FILTER ( 'WIPJobs', [Sales Order] = EARLIER ( 'SalesOrders'[Sales Order] ) ),
            [Job],
            ","
        )
)

vtangjiemsft_0-1710223668867.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Greg_Deckler
Super User
Super User

@OlegV Try:

Measure = 
    VAR __SO = MAX('SalesOrders'[SalesOrder])
    VAR __Result = CONCATENATEX( FILTER( 'WIPjobs', [SalesOrder] = __SO ), [Job], ", " )
RETURN
    __Result

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.