Forum Discussion

jamuka's avatar
jamuka
Helper IV
6 years ago
Solved

Divide between two tables

Hello, I want to divide my total sales amount in Sales Table to total visitor number based on location in Visitors Table. Tables have inactive relationship, based on store location (there are two l...
  • AlB's avatar
    6 years ago

    Hi jamuka 

    Since the relationship is inactive, place the fields shown from the Sales table in a table visual and create a measure:

    NumVisitors =
    CALCULATE (
        SUM ( VistorsT[Visitor] ),
        FILTER (
            ALL ( VistorsT ),
            VisitorsT[Store Location] = SELECTEDVALUE ( SalesT[Store Location] )
                && VisitorsT[Date] = SELECTEDVALUE ( SalesT[Date] )
        )
    )
    

     This will give you the number of visitors in that location and day. Yo can use that to calculate the quotient as required

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     Cheers