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
eric_005
New Member

Rolling date not capturing the latest month of my dataset

I have this measure created but it is not capturing my latest month of my dataset. 

If I tick April for example, it shows only Mar 23 - Mar 24. But if I tick month of May, the charts are empty.

 

Here is my code.  Please help.

 

**Total Visits | Last 13 Months =
VAR MaxDate = MAX(CalendarTable[Date])
VAR MaxDate_13MonthsAgo = EDATE(MaxDate, -13)
VAR Result =
    IF(
        HASONEVALUE(RollingDate[MonthYear]) &&
            MAX(RollingDate[Date]) <= MaxDate &&
            MIN(RollingDate[Date]) >= MaxDate_13MonthsAgo,
            CALCULATE(
                    [Total Sum Value],
                FILTER(
                    ALL(CalendarTable[Month],CalendarTable[Year],CalendarTable[MonthYear]), CalendarTable[Month] = VALUES(RollingDate[Month] ) && CalendarTable[Year] = VALUES(RollingDate[Year]) && CalendarTable[MonthYear] = VALUES(RollingDate[MonthYear])
                )
            ),
            BLANK()
    )
RETURN
    Result
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I am not sure about what you want but see if my solution in the attached file helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I am not sure about what you want but see if my solution in the attached file helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish, your solution is working! Just what I needed! Appreciate your help! 🙂

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.