Forum Discussion

nenadpekec's avatar
nenadpekec
Frequent Visitor
5 years ago
Solved

Latest date in a matrix

Hello, I have test data like this: NOTE: You can download it at https://gofile.io/d/xPHIGM   The report should be simple, one slicer (Date) and a Matrix visual. The problem that I'm unable...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, nenadpekec 

    Please check the below picture and the sample pbix file's link down below.

     

     

    Value Total =
    VAR currentuser =
    MAX ( Users[User] )
    VAR currentparameter =
    MAX ( Parameters[Parameters] )
    VAR latestdate =
    CALCULATE (
    MAX ( 'Values'[Date] ),
    FILTER (
    ALLSELECTED ( 'Values' ),
    'Values'[User] = currentuser
    && 'Values'[Parameters] = currentparameter
    )
    )
    RETURN
    CALCULATE (
    SUM ( 'Values'[Value] ),
    KEEPFILTERS (
    FILTER (
    ALL ( 'Values' ),
    'Values'[User] = currentuser
    && 'Values'[Parameters] = currentparameter
    && 'Values'[Date] = latestdate
    )
    )
    )

     

     

    https://www.dropbox.com/s/ufn9epk67zsk9qe/nenadpekec.pbix?dl=0 

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM