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
Hippocampus
Frequent Visitor

Count rows of last year to date

Hi all I have created a measure which is the value in a visual matrix, which counts the rows of the selected Year up to  the current date (selected based on a range slicer):

RowsCountSelectedDateRange =
VAR MinDate = CALCULATE(MIN(table[date]), ALLSELECTED(table[date]))
VAR MaxDate = CALCULATE(MAX(table[date]), ALLSELECTED(table[date]))
RETURN
CALCULATE (
    COUNTROWS ( table),
    FILTER (
        table,
      table[date] >= MinDate && table[date] <= MaxDate
    )
)
I would like to create the same measure but for the Last year up to this day(of previous year). Thanks all.
1 REPLY 1
lbendlin
Super User
Super User

EDATE(...,-12)

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
Top Kudoed Authors