Forum Discussion

KS_India's avatar
KS_India
Frequent Visitor
2 years ago
Solved

How to retrieve value from Incentive Measure by using if condition

Hi Team, I am introducing new incentive value through measure. I need to give the same incentive only on hardware so by introducing new column I put a if condition that "

Revised Sales = if('Table'[Commodity] ="Hardware",Incentive[Incentive Value],'Table'[Incentive])" but it's not fetching the data. it returns values in Software and Services but not for Hardware. Can you please support. Thanks
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi KS_India 

     

    Based on your description, my understanding is that you seem to have two tables and have created a calculated column that uses fields from both tables in that formula. As per my judgment, your screenshot shows the data from the "Table" table, can you show the data from the other table so that I can help you better. Please remove any sensitive data in advance.


    For now, my suggestion is that you try the following formula:

     

    Revised Sales = if('Table'[Commodity] = "Hardware", 'Table'[Incentive], BLANK())

     

     

    Best Regards,
    Yulia Xu

     

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

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi KS_India 

     

    Based on your description, my understanding is that you seem to have two tables and have created a calculated column that uses fields from both tables in that formula. As per my judgment, your screenshot shows the data from the "Table" table, can you show the data from the other table so that I can help you better. Please remove any sensitive data in advance.


    For now, my suggestion is that you try the following formula:

     

    Revised Sales = if('Table'[Commodity] = "Hardware", 'Table'[Incentive], BLANK())

     

     

    Best Regards,
    Yulia Xu

     

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

  • KS_India's avatar
    KS_India
    Frequent Visitor

    Thanks Yulia for your revert, much appreciated.

    I have only one table where I have Net Price, Incentive and Net Sales (Net Price - Incentive). Now, I want to make it dynamic by using paramaters. If I put some x number in parameter and with "If" function, can it fetch that data and place the number as incentive for hardware, rest should appear as is. So currently incentive of hardware is 50, I want 60 by using "if" function. 
    Is it possible.
    Thanks a lot,

    KS 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi KS_India

       

      I apologize for misunderstanding your point. Now I did the following test.

       

      Depending on your needs, you need to get dynamically changing parameter values, then you need to create measure.

       

      Revised Sales = if(MAX('Table'[Commodity]) ="Hardware", SELECTEDVALUE('Incentive Value'[Parameter]), MAX([Incentive]))

       

       

      Result:

       

      Best Regards,
      Yulia Xu

       

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

      • KS_India's avatar
        KS_India
        Frequent Visitor

        Hi Yulia, 

        I am one more challenge. Now, total is not right. Here is the snip

         

        Formula I have used for New Incentive is 

        New Incentive = if(MAX('Table'[Commodity])="Hardware",SELECTEDVALUE(Incentive[Incentive]),MAX( 'Table'[Incentive]))
         
        and for New Sales
        New Sales = max('Table'[Net Price])-('Table'[New Incentive])
         
        Can you please look at it one more time. 
        Many Thanks

         

  • KS_India's avatar
    KS_India
    Frequent Visitor

    Thanks a lot Yulia Xu....Simply Superb.
    Will keep bothering you 🙂
    Loads of love and respect.
    Rgds,

    KS ~