Forum Discussion

gmasta1129's avatar
gmasta1129
Icon for Resolver I rankResolver I
4 years ago
Solved

If Statement with Column and Measure

Hello,   I am having issues with the measure value that pulls in when i use it in an if statement with a column The formula is as follows... Measure =  if(daily_report[master portfolio id]=729,[N...
  • amitchandak's avatar
    4 years ago

    gmasta1129 , That seem more like column not measure , Try a measure like

     

    CALCULATE(SUM(daily_report[fx prv]), filter(daily_report,daily_report[master portfolio id] <> 729))
    + CALCULATE([Net FX P&L2], filter(daily_report,daily_report[master portfolio id] = 729))

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi gmasta1129 ,

     

    Your formula with IF function seems to be a calculated column, right? A calculated column is static, it won't be changed by the filter of the slicer. However, measures do. You could create a measure instead of the orginal calculated column.

    What is the difference between Power BI calculated columns and measures? - TrueCue.

     

     

    Best Regards,

    Stephen Tao

     

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