Forum Discussion

SpiroswayGR's avatar
SpiroswayGR
Resolver III
5 years ago
Solved

Division between 2 Different source tables

Dear all,   First of all ,  we have 2 tables : On 1st table , we have revenue data (fake data) and on 2nd table we have (Days)_ and we want to divide revenue with days and create a new table. Pos ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi SpiroswayGR ,

    You can create a measure as below, please find the details in the attachment.

    Measure = 
    VAR _rev =
        CALCULATE (
            SUM ( 'Table1'[Revenue] ),
            FILTER ( 'Table1', 'Table1'[POS FOODS] = SELECTEDVALUE ( 'Table2'[Code] ) )
        )
    RETURN
        DIVIDE ( _rev, CALCULATE ( SUM ( 'Table2'[Days] ) ), 0 )

    If the above one is not your expected result, please provide some sample data with Text format and your expected result with backend logic and specific examples. Thank you.

    Best Regards