Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

calculate when selected in dynamic filter

Case:

I have three different income values (webshop, store and store house) in a dynamic filter.
When webshop is selected I have to calculated the turnover minus the cost of adwords. In the other cases the adwords cost do not have to be subtracted.
Can someone help me out with this?

  • Hi Anonymous

     

    Try this MEASURE

     

    Measure =
    IF (
        SELECTEDVALUE ( TableName[IncomeType] ) = "webshop",
        SUM ( TableName[Turnover] ) - SUM ( TableName[cost of adwords] ),
        SUM ( TableName[Turnover] )
    )

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hi Anonymous

     

    Try this MEASURE

     

    Measure =
    IF (
        SELECTEDVALUE ( TableName[IncomeType] ) = "webshop",
        SUM ( TableName[Turnover] ) - SUM ( TableName[cost of adwords] ),
        SUM ( TableName[Turnover] )
    )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot!