Forum Discussion

dpc_development's avatar
dpc_development
Icon for Helper III rankHelper III
5 years ago
Solved

Including column from parent in Table visual messes up aggregation

Please see the attached excerpt: https://drive.google.com/file/d/1D24cyDv3Y9k2fY6EgtWAERFgWoA9uGxC/view?usp=sharing   I have a formula that calculates which of the rows in the table is the latest v...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous,

    You can create a measure as below:

     

    Latest event date = 
    CALCULATE (
        MAX ( 'Unit Revision'[Event Date] ),
        FILTER (
            ALLSELECTED('Unit Revision'),
            'Unit Revision'[Unit Id] = SELECTEDVALUE ( 'Unit Revision'[Unit Id] )
                && 'Unit Revision'[Event Date] >= MIN ( 'Calendar'[Date] )
                && 'Unit Revision'[Event Date] <= MAX ( 'Calendar'[Date] )
        )
    )

     

    Best Regards