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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
justin1102
Regular Visitor

How to show SelectedValue in a new column of table?

Hi,

I have 3 tables Sheet1, ChildTable and ChildTable2. I have insert a new column in ChildTable called "ValueSelected". The value in "ValueSelected" in ChildTable I want be SELECTEDVALUE(ChildTable2[Date].[Day]). But, when i selected the ChildTable2[Date].[Day]. The value in ChildTable would not changed, it is empty. 

 

May I ask why and how to solve this?

 

Please any expert help me to solve this!

 

 

justin1102_0-1681288250450.png

 

3 REPLIES 3
joaoribeiro
Kudo Kingpin
Kudo Kingpin

Hi @justin1102 , please consider using the LOOKUPVALUE function to search the desired column from the ChidlTable2, or use the RELATED function to indicate to Power BI that the tables have a indirect relationship.

 

https://learn.microsoft.com/pt-br/dax/lookupvalue-function-dax
https://learn.microsoft.com/pt-br/dax/related-function-dax

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

@joaoribeiro 

Hi, thanks for replying! Based on the image below, my expected result want to be "Day" value and insert it into "LatestDate" column based on the row that i clicked in the table below. Example, I clicked "Day" = 2 in table below, then the every row of "LatestDate" should be 2.

Note: The above Table is ChildTable and below table is ChildTable2

 

justin1102_0-1681289394921.png

 

@justin1102 consider using the following formula for a new Calculated Field:

LatestDate = 
VAR SOID = (ChildTable[SOID])

VAR Result = 
    CALCULATE(
        MAX(ChildTable2[Day]),
        ChildTable2[SOID] = SOID,
        ALL(ChildTable2[Day])
    )

RETURN Result


Example of result:

joaoribeiro_0-1681301869883.png

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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