Forum Discussion

dw700d's avatar
dw700d
Icon for Post Patron rankPost Patron
5 years ago
Solved

using a relationship to create a visual

Good day,

 

I have two tables. Table 1 Contains location codes, State, and location types. Table 2 contains a special subset of location codes that can also be found in Table 1. I have created a relationship between these two tables and I am trying create a visual that shows the distinct count of "location types" using the location codes found in Table 2. I would also like to filter that visual by location type and State. I originally appended both tables but that made my load and refresh times unbearable. What is the most effective way to create this visual?

 

 

           Table 1

Location CodeLoc TypeState
AHouseGA
BApartmentVA
CBuildingPA
DRentalLA
GSunIN
HSkyOK
IBackgroundNC

 

Table 2

G
H
I

 

 

 

 

  • dw700d , Try a measure

    CALCULATE(countrows(Table1), filter(Table1, Table1[Location] in values(Table2[Location])))

     

1 Reply

  • dw700d , Try a measure

    CALCULATE(countrows(Table1), filter(Table1, Table1[Location] in values(Table2[Location])))