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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KoalaPBI
Frequent Visitor

Measure help to count clients

Hi there,

Following is my sample dataset:

KoalaPBI_0-1658448336084.png

 

I want to create a measure to know 'amongst people who are still in their first 3 months from signup date (that is people who signed up from 22/04/2022 onwards), count of people who made a payment since then, split across relevant months'.

For example : client_id 2 falls in this measure & made a payment in Apr, May, Jun & Jul and is counted in months from Aprl to Jul.

So, the measure result for the above dataset is like this:

 

KoalaPBI_0-1658450082212.png

 

Here is my sample pbi file: https://1drv.ms/u/s!Ag919_pO_UKrghcn8byYZRmTO2TS?e=INaTZr

 

Many thanks for your help!

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

@KoalaPBI ,

Seem like you need running total

 

Measure = CALCULATE(distinctCount('Table'[Client_id]) ,filter(allselected(Datedim), Datedim[Date] <= max(Datedim[Date]) && Datedim[Date] >= EOMONTH(TODAY(),-4)+1 && Datedim[Date] <= TODAY()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@KoalaPBI , Create a measure like

 

Measure =

var _max = Today() ,

var _min = date(year(_max), Month(_max) -3, day(_max) )

return

calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))

 

 

or

 

Measure =

var _max = Today() ,

var _min =eomonth(_max,-4)+1

return

calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thanks, but I can't get the expected result: 

KoalaPBI_0-1658454535284.png

 

@KoalaPBI ,

Seem like you need running total

 

Measure = CALCULATE(distinctCount('Table'[Client_id]) ,filter(allselected(Datedim), Datedim[Date] <= max(Datedim[Date]) && Datedim[Date] >= EOMONTH(TODAY(),-4)+1 && Datedim[Date] <= TODAY()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors