The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all
I'm very new to PowerBI and I'm trying to move my Tableau dashboards over, however I'm extremely stuck and none of the questions/answers on the forum have helped so far.
I need to add a column showing the last person who contacted a company.
for example - the table looks like this....
Date | Customer | Contacted by |
01/03/2021 | Smiths | Sally |
28/02/2021 | Smiths | John |
12/02/2021 | Hammonds | Sally |
02/03/2021 | Smiths | Peter |
22/01/2021 | Hammonds | John |
14/11/2020 | Cartwrights | Peter |
03/03/2020 | Cartwrights | Hannah |
21/01/2021 | Hammonds | Keith |
The results should be....
Date | Customer | Contacted by | Last contacted by |
01/03/2021 | Smiths | Sally | Peter |
28/02/2021 | Smiths | John | Peter |
12/02/2021 | Hammonds | Sally | Sally |
02/03/2021 | Smiths | Peter | Peter |
22/01/2021 | Hammonds | John | Sally |
14/11/2020 | Cartwrights | Peter | Peter |
03/03/2020 | Cartwrights | Hannah | Peter |
21/01/2021 | Hammonds | Keith | Sally |
I've tried.....
Solved! Go to Solution.
@Michsara , Try like
Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),allexpect('Table','Table'[customer]))
or
Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),filter(allselected('Table'),'Table'[customer] = max('Table'[customer])))
@Michsara , Try like
Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),allexpect('Table','Table'[customer]))
or
Last Contacted by = calculate(LASTNONBLANKVALUE('Table'[Date],MAX('Table'[Contacted By])),filter(allselected('Table'),'Table'[customer] = max('Table'[customer])))
That's fantastic - the first option worked. Thank you so much 😊
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |