Forum Discussion

PDS001's avatar
PDS001
Regular Visitor
3 years ago
Solved

Reference different tables when creating a measure

I am trying to create a Measure within a table called 'All Sales'. The Measure should calculate the ratio of times "1" appears in the [Sales] column in the 'Sales Numbers' table, to the number of rec...
  • Ashish_Mathur's avatar
    3 years ago

    Hi,

    Create a single column table called Records with only unique Record ID in that table.  Create a relationship (Mnay to One and Single) from the RecordID column of the 2 data tables to the RecordID column of the new table.  Write these measures and drag the last one to a card visual

    Measure1 = calculate(COUNTROWS('sales'),'Sales'['Sales Numbers'], == "1")

    Measure2 = COUNTROWS('All Sales')

    measure3 = divide([Measure1],[Measure2])

    Hope this helps.