Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Creating a logical parameter with Summarize?-

Hi,

 

I want to give customers a certain % of deduction if ALL the customers within that group meet a specific YoY (year over year) criteria of revenue growth.

 

So for example, the measure below:

 

I'm having trouble with this yellow part - I don't want each customer to get 18% if their individual YoY% is above 10% *but rather if all customers have a YoY% above 10%*, then the customer (and all others) should get min 18%...

 

 

 

So technically because the YoY% in 2022 was more than 10% (16% as you see below), there shouldn't be any 15% deductions (see red arrowed column).

 

Please what am I doing wrong?

 

Thanks,

Eyal

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Just to be clear:

    As you can see in the below measure 'Deductions % per SchemeV2":

     

     

    Deductions % per SchemeV2:=iferror(sumx(summarize(cust1,CUST1[Buying Group2]),

    IF(calculate([YoY% XX],CUST1[Buying Group2]="Blue Vet")>0.1,0.18)),0)

     

    Screenshot for your convenience-

     

     

     

    See below that I have the 0.18 show up every time the YoY% is above 10% on a customer level. Can you help me understand what I need to change in the measure above so that 0.18 shows up all the time because the entire group is performing at *16%* (more than 10%)?

     

    Thanks!

     

     

     

     

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi  Anonymous 

    Thanks for reaching out to us.

    the YoY% in 2022 was more than 10% (16% as you see below),  so the [Deductions % per Scheme] should be 18% each row right? The reason for this error, I think it may be that the called [YoY% in 2022] is incorrect when calculating [Deductions % per Scheme]  in each row, please try to change the measure to return YoY% in 2022

    Best Regards,

    Community Support Team _Tang

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