Forum Discussion

ljimenezvega84's avatar
11 months ago
Solved

Substract in a dataset

Hi everyone, i got a very simple sataset just like the table below, its possible to substract a fixed ammount in only 1 GL Account? Lets says substract 500$ in the GL Account 201000? 

 

Thanks for your help

 

GL AccountAmmountPeriod/Year
2020001.0001/2025
2010002.0001/2025
2030003.0001/2025
2040004.0001/2025
  • Hi ljimenezvega84 

     


    You can create a calculated column

    IF ( tbl[gl account] = 201000, tbl[amount] - 500, tbl[amount] )


    or write a measure

    SUMX ( tbl, IF ( tbl[gl account] = 201000, tbl[amount] - 500, tbl[amount] ) )

     

     

2 Replies

  • Hi ljimenezvega84 

     


    You can create a calculated column

    IF ( tbl[gl account] = 201000, tbl[amount] - 500, tbl[amount] )


    or write a measure

    SUMX ( tbl, IF ( tbl[gl account] = 201000, tbl[amount] - 500, tbl[amount] ) )

     

     

    • ljimenezvega84's avatar
      ljimenezvega84
      Icon for Helper I rankHelper I

      Thanks only need to put ¨ " in the gl account and works.

       

      Thanks again