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! Learn more

Reply
AH2022
Helper II
Helper II

Display YTD of Active Clients (at least 1 purchase within last 12 months)

Hi all,

 

My table displays now : active clients (at least 1 purchase within the last 12 months)

Blue columns in the graphic

 

ActiveClientCount =SUMX(RE_Client,

      IF(CALCULATE(ClientMeasureTable[ClientCount], DATESINPERIOD(DimDates[Date], lastDATE(DimDates[Date]), -1, YEAR))=1,1,0))

//at least 1 purchase within the last 12 months

AH2022_0-1687458285109.png

 

How do I display the active clients (gave at least 1 time during the last 12 months), but YTD (meaning only 1 April to June 22nd of each year?) Orange columns in the graphic

 

I tried :

 ActiveClientCountYTD = CALCULATE([ActiveClientCount], DATESYTD(DimDates[Date], "31-03"))

Displays the same result (blue columns).

 

Any help would be much appreciated: advice or link or any other reference.

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AH2022 ,

 

Please try:

Measure = 
CALCULATE(
    [ActiveClientCount],
    DATESBETWEEN(
        DimDates[Date],
        DATE(YEAR(DimDates[Date]), 4, 1),
        DATE(YEAR(DimDates[Date]), 6, 22)
    )
)

This measure uses the function to filter the date range from April 1st to June 22nd for each year.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @AH2022 ,

 

Please try:

Measure = 
CALCULATE(
    [ActiveClientCount],
    DATESBETWEEN(
        DimDates[Date],
        DATE(YEAR(DimDates[Date]), 4, 1),
        DATE(YEAR(DimDates[Date]), 6, 22)
    )
)

This measure uses the function to filter the date range from April 1st to June 22nd for each year.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.