cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Community Support Team
Community Support Team

Re: Measures work for Calendar Year but not Academic Year

HI @akbar,

 

Actually, time intelligence function not works properly on on unfinished date range. It only calculate with existed part instead full range.

 

For this scenario, I think you had to manually calculate the correspond ranges as filter conditions.(date function)

PYT =
VAR seleted =
    ALLSELECTED ( 'calendar' )
VAR _start =
    MINX ( ALLSELECTED ( 'calendar' ), [date] )
VAR _end =
    MAXX ( ALLSELECTED ( 'calendar' ), [date] )
RETURN
    CALCULATE (
        SUM ( table[amount] ),
        FILTER (
            ALL ( 'calendar' ),
            [date]
                >= DATE ( YEAR ( _start ) - 1, MONTH ( _start ), DAY ( _start ) )
                && [date]
                    <= DATE ( YEAR ( _end ) - 1, MONTH ( _end ), DAY ( _end ) )
        )
    )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
akbar Frequent Visitor
Frequent Visitor

Re: Measures work for Calendar Year but not Academic Year

Hi @v-shex-msft 

 

Thanks for all your time and help. it seems enough time has passed that the measures can now pick up the neccessary dates and it appears to be fully functional, I appreciate all the help.

 

Thanks,

 

Akbar

Helpful resources

Announcements
New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (3,487)