The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear All,
I am having trouble calculating sum of coulmn by filtering two or more coulmn.
In the below table I'm trying to calculate the the sales for any country from [Final Location] to sum 1st stop location and 2nd stop location based on the filter which matchs the [Final Location].
Please ask me if it's not clear.
Date | Sales | 1st stop location | 2nd stop location | 3rd stop location | Final Location |
6/12/2019 | $ 2,158 | Djibouti | Somalia | India | India |
7/2/2019 | $ 525 | Somalia | Tajikistan | India | India |
7/8/2019 | $ 2,415 | Tajikistan | India | India | Singapore |
7/22/2019 | $ 215 | India | India | Singapore | Thailand |
11/6/2019 | $ 212 | India | India | Thailand | India |
6/12/2019 | $ 21,585 | India | Bangladesh | India | India |
7/2/2019 | $ 899 | Singapore | Hong Kong | India | India |
7/8/2019 | $ 484 | Thailand | India | India | India |
7/22/2019 | $ 5,416 | India | India | India | India |
7/23/2019 | $ 954 | India | India | India | India |
7/24/2019 | $ 7,854 | Bangladesh | India | India | India |
7/25/2019 | $ 658 | India | India | India | India |
7/26/2019 | $ 254 | India | India | India | Thailand |
7/27/2019 | $ 96 | Hong Kong | India | Thailand | Singapore |
7/28/2019 | $ 411 | India | India | Singapore | Djibouti |
7/29/2019 | $ 471 | India | India | Djibouti | Somalia |
7/30/2019 | $ 111 | Thailand | Somalia | Thailand | |
7/31/2019 | $ 1,001 | Singapore | Tajikistan | India | |
8/1/2019 | $ 81 | Djibouti | India | India | |
8/2/2019 | $ 945 | Somalia | India | India | |
8/3/2019 | $ 894 | Tajikistan | India | India | |
8/4/2019 | $ 525 | India | Bangladesh | India | |
8/5/2019 | $ 2,415 | India | Hong Kong | India | |
8/6/2019 | $ 215 | India | India | India | |
8/7/2019 | $ 212 | Bangladesh | India | India | |
8/8/2019 | $ 21,585 | Hong Kong | India | ||
8/9/2019 | $ 899 | India | India | ||
8/10/2019 | $ 484 | India | |||
8/11/2019 | $ 485 | India | |||
8/12/2019 | $ 486 | India | |||
8/13/2019 | $ 487 | India | |||
8/14/2019 | $ 555 | India | |||
8/15/2019 | $ 489 | India | |||
8/16/2019 | $ 1,561 | India | |||
8/17/2019 | $ 491 | India | |||
8/18/2019 | $ 492 | India | |||
8/19/2019 | $ 484 | India |
Expected Result:
Estimated | ||
location | sales sum of 1st stop | sales sum of 2st stop |
India | $ 21,584 | $ 25,415 |
Somalia | $ 6,521 | $ 687 |
Thanks!
Hi @Anonymous ,
I still have a little confused about your logic based on your data sample and your expected output.
If it is convenient, could you make an example for sales sum of 1st stop so that we could help further on it?
In addition, what is the location column from in your expected result?
Best Regards,
Cherry