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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

selecting a specific data in a table

Hi,

 

This is my first topic, I'm realy new at using Power BI. Please be indulgent Smiley Happy

I have a table (TABLE1) gathering different combination of 3 data (numbers and strings) for which I have a specific result as a string.

DATA1.DATA3.DATA3 = result

Example :

A.1.N = a

A.1.S = b

A.2.N = c

........

 

In an other table (TABLE2), there are 3 differents columns indicating different combination (A1N, etc), and I would like to add a column giving the result for each combination (a, b, c, ....)

 

Can I have some help please ?

Thanks a lot !

 

 

1 ACCEPTED SOLUTION

If you are doing this as a calculated column in ZTM01 you could use the LOOKUPVALUE() function (see https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax )

 

Which I think would be something like the following in your model:

 

LOOKUPVALUE( RELACHE[Validation],
RELACHE[Cas], ZTM01[Condition 1],
RELACHE[DELAIS AVANT SM], ZTM01[Condition 2],
RELACHE[CRENEAU], ZTM01[Condition 3]
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Please share a pic of two tables to understand how the data is structured.

Anonymous
Not applicable

Here is the table RELACHE with combinations of columns (CAS, DELAIS AVANT SM, CRENEAU) and the related results (VALIDATION)

list of combinations and related solutionslist of combinations and related solutions

Here is the table ZTM01 in which I have combination of data (CONIDTION 1, CONDITION 2 CONDITION 3) and for which I want the related result (VALIDATION)

 

data to analyzedata to analyze

Actually I have found a solution, but it is a workaround and I would like to know a better way to do it.

For both tables, I have concatenated the different combinations in the column CODE and I have created a relation "1 to many" between those two tables to find the related result. 

 

Do you have an idea how to it based directly on three different columns (CONDITION1, 2 and 3) and not by concatenating ?

 

Thanks for your help.

If you are doing this as a calculated column in ZTM01 you could use the LOOKUPVALUE() function (see https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax )

 

Which I think would be something like the following in your model:

 

LOOKUPVALUE( RELACHE[Validation],
RELACHE[Cas], ZTM01[Condition 1],
RELACHE[DELAIS AVANT SM], ZTM01[Condition 2],
RELACHE[CRENEAU], ZTM01[Condition 3]
)

Anonymous
Not applicable

it works 🙂

Thanks a lot for your help !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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