Forum Discussion

sdhn's avatar
sdhn
Icon for Responsive Resident rankResponsive Resident
4 years ago
Solved

DAX Calc.

Hi All,   I have  a Source SS as below.     I want to remove last row total and wants to calculate values thru Power Bi.   There are  formulas in the total of Column E  & I as:   ...
  • v-robertq-msft's avatar
    4 years ago

    Hi, 

    According to your description, I can roughly understand your requirement, I think you can try to achieve this by creating 3 measures for the columns E, H, and I:

    Column E =
    
    var _D43=SUMX(ALL('Table'),'Table'[D])
    
    var _C43=SUMX(ALL('Table'),'Table'[C])
    
    return
    
    IF(_D43<=0,"N/A",DIVIDE(_C43,_D43))
    Column H =
    
    var _F43=SUMX(ALL('Table'),'Table'[F])
    
    var _G43=SUMX(ALL('Table'),'Table'[G])
    
    return
    
    _F43+_G43
    Column I =
    
    var _H43=SUMX(ALL('Table'),'Table'[D])
    
    var _D43=SUMX(ALL('Table'),'Table'[C])
    
    return
    
    IF(_H43>0,"N/A",DIVIDE(_H43,_D43))

    And you can create a table chart to place the measures to get what you want, like this:

     

    You can download my test pbix file below

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

    Thank you very much!

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.