Forum Discussion
Create Customer table from Sale table with multiple Customer Names
- 3 years ago
Dear DOLEARY85 ,
I have tried and some old names still because of FIRSTNONBLANK function I think.
So, I tried with LASTDATE function of Order date and it gave me the expected results.
Pbix file is not able to share for me.
So, Please check the screenshot and let me know your thought.
Thanks a lot for your help.
Best Regards,
KMT
Hi,
try creating a new table with this, which works with your current data:
Alternatively try:
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Dear DOLEARY85 ,
Thanks a lot for your help and it is working properly.
I'd like to request you another one becuase there have some blank customers in sale table.
I'd like to remove those blank customers before creating customer table.
Can you please help for this also? Thanks.
Regards,
KMT
- DOLEARY853 years agoResident Rockstar
How does the data look in the sales table for the blank customers, is it both the customer id and name that's blank?
- KyawMyoTun3 years agoHelper IV
Yes, both customer id and customer names are the blank
becuase of some manual invoicing.
I'd like to ignore the customers for those invoices. Thanks.- DOLEARY853 years agoResident Rockstar
Okay try chaning the new table formula to(i've added in bold the additions to a previous table:
New Table =FILTER(ADDCOLUMNS(DISTINCT('Table'[CUSTOMER ID]),"Customer Name", CALCULATE(FIRSTNONBLANK('Table'[CUSTOMER NAME],CALCULATE(MAX('Table'[ORDER ID]))))),NOT('Table'[CUSTOMER ID]=""))If I answered your question, please mark my post as solution, Appreciate your Kudos 👍