Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Client | Country | City | ID | Flag | Sales | Expected |
AAA | India | Bangalore | 1 | Y | 300 | 600 |
AAA | India | Bangalore | 2 | N | 300 | 300 |
BBB | India | Bangalore | 1 | Y | 300 | 500 |
BBB | India | Bangalore | 2 | N | 200 | 200 |
I have data as above...I want to create the last column and it will based on the Total column.
If Flag = Yes, sum(total <Client,City> Sles), sum(Sales).
IF Flaf is yes, I want the total sales by client and city...here 600 is 300+300 for Client AAA in Bangalore.I tried the above logic, but it is not working.
Can someone please let me know what am I missing.
Hi @BI_Dev ,
Except '' and open and close the if(), the rest is ok, to achieve this result.
if(Flag='Y',
sum(total <Country,City> Sales) , sum(Sales) )
@BI_Dev
Close the topic with the solution provided.
Thanks