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
Anonymous
Not applicable

Need a help

Hello everyone!

I do not know how to put into second table "how_likely_are_you_to" data.

If the year is 2019 then from the first table I want to take latest available value in 2019, in this case 7, and fill the second table next to 6/6/2019 by CustomerID. Then I want to take the latest available value for 2018 from the first table and fill the second table next to 6/2/2018. But keeping in mind that there are situations when the second table can contain the same year 2 or more times (ex 2014), and in this case I still want to take the latest available value from 2014 and fill every row where the year is 2014 in the second table 

 

Customer ID in the same in the 1st and in the 2nd  table

Year = year (CreatedDate)

 

I used this measurement but i'm missing something:

NPS = LOOKUPVALUE('Marketing Survey'[How_likely_are_you_to__c],'Marketing Survey'[year],lastNONBLANK(iFinance[year],1),'Marketing Survey'[CustomerID],SELECTEDVALUE('Marketing Survey'[CustomerID]))

image.png

 

image.png

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Let me know if you'd like to get below results:

1. Add the calculated column in the first table:

Year = YEAR('Table'[CreatedTime])

2. Add the measure:

Measure 2 = CALCULATE(MAX('Table'[CreatedTime]),ALL('Table'),VALUES('Table'[Year]))

3. Manage the relationship between table1 and table2:

0001.PNG

4. Then you get the latest time in table 2:

0002.PNG

Community Support Team _ Dina Ye
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-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Let me know if you'd like to get below results:

1. Add the calculated column in the first table:

Year = YEAR('Table'[CreatedTime])

2. Add the measure:

Measure 2 = CALCULATE(MAX('Table'[CreatedTime]),ALL('Table'),VALUES('Table'[Year]))

3. Manage the relationship between table1 and table2:

0001.PNG

4. Then you get the latest time in table 2:

0002.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

You might consider creating pbix file that will contain some sample data, upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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.