Forum Discussion

misterian's avatar
misterian
Regular Visitor
8 years ago
Solved

Time Intelligence not working for me

There must be someting I'm missing here. I can manually do the following to get YTD and it works on my data. That is it resets the total for each year etc. I would like to do a "TOTALYTD" version but it won't work. Note the 'Date' table has all dates and from what I can see has been "automatically" made to be the calendar for the model.

 

Alarms YTD = 
CALCULATE(
    COUNTROWS(system),
    FILTER (
        ALL(system),
        AND( 
           system[Time].[Date] >= DATE( YEAR ( MAX ( 'Date'[Calendar].[Date] ) ), 1, 1),
            system[Time].[Date] <= MAX ('Date'[Calendar].[Date])
        )
    )
)

But for quartely this one below does not work. It does not reset the the count each quarter.

 

Alarms QTD = 
CALCULATE(
    COUNTROWS(system),
    FILTER (
        ALL(system),
        AND( 
           system[Time].[Date] >= STARTOFQUARTER('Date'[Calendar].[Date]),
            system[Time].[Date] <= MAX ('Date'[Calendar].[Date])
        )
    )
)

Here's a screenshot of the matrix results.

 

 

I've tried all kinds of Time Intelligence ways to get it but it won't work. Note that my data is counting the number of rows not a mathematical total as I am counting "events".

 

Finally, if I can get this to work with the time intelligence then I need to get it all to work to shoe the current quarter and year total to today on a card.

 

Thanks all in advance!

7 Replies