Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
asandor
Regular Visitor

Count repeat physicians from previous quarter

I have a table with entry_time, PhysicianID and SalesRep

 

Im trying to see the count of PhysicianID from physicians that were users in the previous quarter and this quarter (Q2, Q3).

 

**Confidential info so can't provide screenshot of data. entry_time, PhysicianID and SalesRep are exact column names. 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @asandor ,

 

Please create a date table: Calendar = CALENDAR( DATE ( 2021, 9, 1 ), TODAY () )

 

Then create these measures.

 

Q2 = 
CALCULATE (
    COUNT ( 'Table'[PhysicianID] ),
    DATEADD ( DATESQTD ( 'Calendar'[Date] ), -1, QUARTER )
)
Q3 = 
CALCULATE ( COUNT ( 'Table'[PhysicianID] ), DATESQTD ( 'Calendar'[Date] ) )

vkkfmsft_0-1658134254364.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @asandor ,

 

Please create a date table: Calendar = CALENDAR( DATE ( 2021, 9, 1 ), TODAY () )

 

Then create these measures.

 

Q2 = 
CALCULATE (
    COUNT ( 'Table'[PhysicianID] ),
    DATEADD ( DATESQTD ( 'Calendar'[Date] ), -1, QUARTER )
)
Q3 = 
CALCULATE ( COUNT ( 'Table'[PhysicianID] ), DATESQTD ( 'Calendar'[Date] ) )

vkkfmsft_0-1658134254364.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@asandor , check if customer repeat logic can be applied in your case. Use datesqtd in place of datesmtd

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.