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
ADDHOPE
Frequent Visitor

how to return the value for the selected item in power bi dax and show it as new record

Hello All,

 

I have similar structure as below tables. (The sample data is as below. Both table are connected on ItemID)

 

ADDHOPE_1-1670101936185.pngorder Data

ADDHOPE_2-1670101954670.png repair data

 

 

 

I have to now find out the ID which have different sales country and different repair country. I can do that easily for 1st repair country by this formula. (As I have manually calculated the index based on the repair date)

Solved: Re: how to find the second value for the selected ... - Microsoft Power BI Community

FYI: Explanation on calculating Index. @v-yuezhe-msft 

1st Repair = CALCULATE(COUNT('Table1'[ItemID],'Table2'[RepairCountry] <> SELECTEDVALUE('Table1'[SalesCountry]))

But now I have to find get all the ID which have different repair country than sales country. i.e. I want to get those IDs as well if the 2nd or 3rd repair countries are not matching.

 

So the table should list all the ItemID where the Repair country does not match the sales country irrespective of the instance, where it happened in 3rd or 2nd.

 

Can you please help 

 

 

 

Regards,

1 ACCEPTED SOLUTION
VijayP
Super User
Super User

@ADDHOPE 

In this file I have done the poc for you. But still I could not understand only 2 records you are expecting where as 4 records are mismatching ! watch the video and you can understand my question!

https://drive.google.com/file/d/1jkip32jrS-WZHN6_DkE6afDbFynv4RnA/view?usp=share_link




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

3 REPLIES 3
VijayP
Super User
Super User

@ADDHOPE 

In this file I have done the poc for you. But still I could not understand only 2 records you are expecting where as 4 records are mismatching ! watch the video and you can understand my question!

https://drive.google.com/file/d/1jkip32jrS-WZHN6_DkE6afDbFynv4RnA/view?usp=share_link




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


VijayP
Super User
Super User

@ADDHOPE 

To make it more clear ,can you add a snapshot of what is your final out come should look like. It helps us to answer the question with more accurate thought




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Hello Vijay, @VijayP 

 

It should look like this. 

This list the ItemID details where the original sales country does not match the repair country.

ADDHOPE_0-1670165065868.png

The challenge I have is to look through the all repair data of Item and identify at those records which have different sale country and different repair country.

 

Hope this helps 🙂 

Regards,

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.