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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.