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.
I have a huge table of patients for the last 6 months or so. I want to find out who are brand new patients last month or the month before. It should be pretty straight forward but can't really get it. Thank you so much in advance for your help.
Hi @Naz Please try below code
Table = SUMMARIZECOLUMNS(Data[Patient],"FirstDate",MIN(Data[Date]),"Medicine",CALCULATE(MAX(Data[Medicine]),FILTER(Data,Data[Date]=MIN(Data[Date]))))
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
9 | |
7 |