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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DsIshukone
Regular Visitor

Select value and return corresponding values associated within group of selected value

Hi community,

 

I'm now facing a quite tricky situation that I will need help from you experts, so here's the situation:

 

I have a dataset, in this dataset there's ID, Long for longitude, Lat for Latitude, Pix (a coordinate in Lambert Conformal Conic format, it has 2 parts, one for x and one for y), and Score. Records with different Long and Lat will be grouped into the same Pix (e.g., Records 1 to 5 with same Pix x10000_y10000, even though their Long and Lat are totally different, Records 6 to 8 with same Pix x10800_y10000).

 

What I want to achieve, for examle if I select Pix equals x10800_y10000 (which is records 6 to 8), the results will return records 6 to 8, as well as records 1 to 5.

 

Let me explain, by selecting Pix x10800_y10000, I want to return all records based on 2 conditions:

1. whose Pix for x is within 1000 of 10800, meaning Pix for x is between 9800 and 11800; 

2. whose Pix for y is within 1000 of 10000, meaning Pix for y is between 9000 and 11000

 

So here, for records 1 to 5, their Pix is x10000_y10000, so the Pix for x is 10000, which is between 9800 and 11800; the Pix for y is 10000, also between 9000 and 11000, both conditions met, thus records 1 to 5 will be returned, along with records 6 to 8. Other records will not be returned, because at least 1 condition is not met.

 

Thank you in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
lbendlin
Super User
Super User

lbendlin_0-1714427062654.png

 

Sorry for late reply, this is a great solution, I never thought it would be that simple! Thank you very much for the help!

DsIshukone
Regular Visitor

Sample dataset looks like:

IDLongLatPixScore
11010x10000_y10000123
21011x10000_y10000456
31012x10000_y10000789
41111x10000_y10000321
51211x10000_y10000654
62020x10800_y100001121
72021x10800_y100001123
82121x10800_y100001125
93030x11900_y106004022
103031x11900_y106004025
113032x11900_y106004028
123130x11900_y106004029
134040x20000_y10000305
144041x20000_y10000306
154042x20000_y10000307
164142x20000_y10000308

 

What I want it returns upon selecting Pix equals x10800_y10000:

IDLongLatPixScore
11010x10000_y10000123
21011x10000_y10000456
31012x10000_y10000789
41111x10000_y10000321
51211x10000_y10000654
62020x10800_y100001121
72021x10800_y100001123
82121x10800_y100001125

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors