Forum Discussion

Bakhtawar's avatar
Bakhtawar
Icon for Post Patron rankPost Patron
7 years ago

Difference between 2 columns in power bi

I am trying to take the difference between two columns. Below is an expression in qlik sense that I would like to translate into DAX

 

LPO_DATE - (CLM_INTM_DT) +1

I tried this in power bi DAX but I don't think it is correct:

 

V_TurnAround_Time = CALCULATE ( SUM ( LPO_excel[LPO_DATE] ) ) - CALCULATE ( SUM ( Claims_excel[CLM_INTM_DT] ) ) + 1

this is link model. dropbox.com/s/52j0s8rn0ze0mci/Claims_test_model.pbix?dl=0 .. in this please check variables table and in that check v_TurnAround_Time measure

11 Replies

  • You need to create relationship between both the table (LPO_Excel, Claims_Excel) and then create measure or column that would work on 'LPO_Date' - 'CLM_INTM_DT'.

     

     

    • Bakhtawar's avatar
      Bakhtawar
      Icon for Post Patron rankPost Patron

      relationship already developed.. have you checked the link ?

      • Tahreem24's avatar
        Tahreem24
        Icon for Super User rankSuper User

        If have seen it so there is an Warning while creating a Many-to-Many relarionship. So make the key values unique and atleast single match in both the key column.

        (See below screen shot of your file)