Forum Discussion
KyawMyoTun
3 years agoHelper IV
Create Customer table from Sale table with multiple Customer Names
Dear Experts, I am trying to create a new unique "Customer" table from existing Sale table in dax. Actully it can be created by using Summarize function with the reuqired columns. The problem ...
- 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
DOLEARY85
3 years agoResident Rockstar
Hi,
try creating a new table with this, which works with your current data:
New Table =
ADDCOLUMNS(
DISTINCT('Table'[CUSTOMER ID]),
"Customer Name", CALCULATE(MAX('Table'[CUSTOMER NAME]), ALLEXCEPT('Table', 'Table'[CUSTOMER ID])))
Alternatively try:
New Table =
ADDCOLUMNS(
DISTINCT('Table'[CUSTOMER ID]),
"Customer Name", CALCULATE(FIRSTNONBLANK('Table'[CUSTOMER NAME],CALCULATE(MAX('Table'[ORDER ID])))))
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍