Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

HASONEVALUE Chalenge

Hello Power BI Friends,

 

I have two tables as below:

 

Incoming

Date, Value

01/01/2018, 100

02/01/2018,0

03/01/2018,150

05/01/2018,200 //note that in this example there isn´t data for April

(...)

 

Costs

Date, Value

02/01/2018,50 //note that in this example there isn´t data for january

03/01/2018,170

04/01/2018,75

05/01/2018,80

06/01/2018, 90

(...)

 

I need a measure that divides the total Incoming by total costs only when there is revenue and cost in the same month.

 

Thanks for your time.

  • Hi richardmoreno,

     

    To achieve your requirement, merge incoming table and cost table by inner join like below:

     

     

    After merged:

     

     

    Then click close&apply, create a measure using dax like below:

     

     

    Regards,

    Jimmy Tao

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi richardmoreno,

     

    To achieve your requirement, merge incoming table and cost table by inner join like below:

     

     

    After merged:

     

     

    Then click close&apply, create a measure using dax like below:

     

     

    Regards,

    Jimmy Tao