Forum Discussion

RichardT_78's avatar
RichardT_78
Helper I
3 years ago
Solved

Controlling Individual matrix row data using a date column

 

How would i use the amended time stamp to influence what i saw on a row level
So, i want to only see everything after the amended date

 

Typically for car A the counts were reduce greatly and only display the results in yellow

Each Car would filter in the same way
Is this possible in this visual
You can use a global filter on the table, but i can’t see how to get each row to present data after a specific event
I have created a test .PBIX but i can’t see anywhere to upload or share it.

 

  • Hi, RichardT_78 

     

    You can try the following methods.

    Measure =
    CALCULATE ( COUNT ( 'Table'[Event description] ),
        FILTER ( ALL ( 'Table' ),
            [Date] > SELECTEDVALUE ( 'Table'[Ammended time stamp] )
                && [Car] = SELECTEDVALUE ( 'Table'[Car] )
                && [Event description] = SELECTEDVALUE ( 'Table'[Event description] )
        )
    )

    Is this the result you expect? If not, simplify your data and give examples of your desired results.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, RichardT_78 

     

    You can try the following methods.

    Measure =
    CALCULATE ( COUNT ( 'Table'[Event description] ),
        FILTER ( ALL ( 'Table' ),
            [Date] > SELECTEDVALUE ( 'Table'[Ammended time stamp] )
                && [Car] = SELECTEDVALUE ( 'Table'[Car] )
                && [Event description] = SELECTEDVALUE ( 'Table'[Event description] )
        )
    )

    Is this the result you expect? If not, simplify your data and give examples of your desired results.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • This is perfect and works as expected. I haven’t been using the filter function correctly. 

    One bit i wasn’t clear on is that the amended date is a measure.  

    This is the measure I’m using albeit i used a simple example for this question.

     

    time@@ = var _cur_car_table = FILTER(ALLSELECTED('Query1') ,'Query1'[Consist]= MAX('Query1'[Consist])&& 'Query1'[EventId]=1919)

    var _t2= ADDCOLUMNS(_cur_car_table,"minus" , ABS([End Date/Time]-NOW()))

    var _latest =  MINX(_t2,[minus])

    var _t3 = FILTER(_t2 ,[minus] = _latest)

    return

    DATEDIFF(MAXX(_t3,[End Date/Time]),NOW(),HOUR)

     

    This searches essentially through all of the turned off events to find the last one and returns the hours since that event. 

     

    I used that following measure to return the amended date , but as a measure 

    Time since aux on date & time = NOW() - [time@@]/24 

     

    do i create a column to use the amended date or can i use a measure in the place of 

    'Table'[Ammended time stamp]