Forum Discussion
mattrixdesign2
3 years agoHelper I
Filtering by Multiple Columns (not AND, but OR)
Hi
Really not sure how to start with this I am going around in circles.
I have tracking table like this...
TRACKING TABLE:
| PROJECT_NUM | Track by Account # | Track by Part # | Track by order # |
| abc123456 | 374728 | null | null |
| abc123457 | null | UH-MADEUP-3 | null |
| abc123458 | null | UH-MADEUP-2000 | null |
| abc123459 | null | null | 34A09024 |
| abc123460 | null | null | 34A09125 |
| abc123461 | 276984 | null | null |
| abc123462 | null | null | 20B07098 |
| abc123463 | null | null | 54YB0D63 |
| abc123464 | null | null | 54YB0HGJ |
| abc123465 | null | null | 1X5B15XY |
| abc123466 | null | null | 1X5B165X |
| abc123467 | null | null | 1X5B15QW |
| abc123468 | 166995 | null | null |
| abc123469 | 155542 | null | null |
INVOICE TABLE:
| Track by Account # | Track by Part # | Track by order # |
| 374728 | Part 1 | 34A09999 |
| 145525 | UH-MADEUP-3 | 56554645 |
| 145525 | UH-MADEUP-2000 | 65666626 |
| 365662 | Part 1 | 34A09024 |
| 234141 | Part ABV | 34A09125 |
| 276984 | Part ABV | 53255252 |
| 466622 | Part ABV | 20B07098 |
| 754775 | Part fdgfds | 54YB0D63 |
| 524325 | Other Park | 54YB0HGJ |
| 475473 | XYZ Part | 1X5B15XY |
| 475473 | AAAA-Part | 1X5B165X |
| 475473 | AAAA-Part | 1X5B15QW |
| 166995 | XXXXX-PN | 32553256 |
| 155542 | XXXXX-PN | 43643243 |
I want to be able to use the TRACKING TABLE to filter the rows of the invoice table, where ever there is a match on ANY column.
Seems obvious but I am lost with it, not even sure what to search for in terms of help.
Any suggestion welcome.
1 Reply
- JohnShepherdAPDHelper II
Hi there,
create inactive relationships like this:
with a measure like this:
VAR _TblAccount = UNION ( CALCULATETABLE ( 'Invoice Table', USERELATIONSHIP ( 'Invoice Table'[Track by Account #], Tracking[Track by Account #] ), NOT ( ISBLANK ( Tracking[Track by Account #] ) ) ), CALCULATETABLE ( 'Invoice Table', USERELATIONSHIP ( 'Invoice Table'[Track by order #], Tracking[Track by order #] ), NOT ( ISBLANK ( Tracking[Track by order #] ) ) ), CALCULATETABLE ( 'Invoice Table', USERELATIONSHIP ( 'Invoice Table'[Track by Part #], Tracking[Track by Part #] ), NOT ( ISBLANK ( Tracking[Track by part #] ) ) ) ) RETURN COUNTX ( _TblAccount, MAX ( Tracking[PROJECT_NUM] ) )you can use this measure then to filter in visuals where the IsTracked is not blank