Forum Discussion

IkmalFikri900's avatar
IkmalFikri900
Frequent Visitor
1 year ago
Solved

Get latest status based on same identifier

Hi everyone, I want to develop this, basically, it will display status based on the latest status accoridng to the Linked column..if the user did not select any specific quarter/year...but if they select Q1 2025, the status will be displayed as Ongoing. How can i do this?

  • HI IkmalFikri900 
    The file shared by Ashish_Excel  provides accurate results as per the request.
    To display 200 in your card, I would recommend using Latest measure where it will correctly display the expected value.
    See below image for reference-


    Reuploadiing the pbix for reference.

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
    Best Regards,
    Community Support Team _ C Srikanth.

     

16 Replies

  • try this:

    CurrentStatus :=
    VAR IsFiltered =
    ISFILTERED('Calendar'[Quarter]) || ISFILTERED('Calendar'[Year])

    VAR SelectedLinkedDate =
    IF(
    IsFiltered,
    MAX(ActivityTable[Linked]), -- Use the latest date in selected period
    CALCULATE(
    MAX(ActivityTable[Linked]),
    ALL(ActivityTable) -- Ignore slicers if nothing is selected
    )
    )

    RETURN
    CALCULATE(
    MAX(ActivityTable[Status]),
    FILTER(
    ActivityTable,
    ActivityTable[Linked] = SelectedLinkedDate
    )
    )

    • IkmalFikri900's avatar
      IkmalFikri900
      Frequent Visitor

      Using this formula, when no specific quarter/year selected, it display Ongoing instead of Completed.

       

      Can you assist?

    • IkmalFikri900's avatar
      IkmalFikri900
      Frequent Visitor

      Hi, thanks for the suggestions, but it doesn't fit my requirement, can you assist?

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        then pls provide more details about your request. what is the expected output?

  • IkmalFikri900's avatar
    IkmalFikri900
    Frequent Visitor

    Update
    Sample Data:

    IDLinkedIDDateStatusUpdateValuesIssueStatus
    111-Jan-25Update 1100Ongoing
    212-Feb-25Update 2150Completed
    331-Jan-25Update 3200Ongoing
    432-Feb-25Update 4200Ongoing

     

    So, the expectation is, when User filter ALL Date Column, visuals should display this

    Info 
    Ongoing Cases1
    Completed Cases1
    Values350

    Since for the latest item (ie February), the latest IssueStatus is Completed and Latest Value is 150 for LinkedID 1. but LinkedID 2 stays the same

     

    When the user Filter January 2025 only, visuals should display:

    Info 
    Ongoing Cases2
    Completed Cases0
    Values300

    Since in January, both LinkedID 1 and 2 status is Ongoing and the value is 100+200

      • IkmalFikri900's avatar
        IkmalFikri900
        Frequent Visitor

        Thanks. it helps a lot,

        Just the Values/T amount where if no filter is selected for ongoing, it shows 500 where it should shows 200 only

         

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

    Hi IkmalFikri900 

    I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
    If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
    Looking forward to your response!


    Best Regards,
    Community Support Team _ C Srikanth.

    • IkmalFikri900's avatar
      IkmalFikri900
      Frequent Visitor

      Hi, apologies for the reply,
      I still havent' been able to resolved the issues.

       

      IDLinkedIDDateStatusUpdateValuesIssueStatus
      111-Jan-25Update 1100Ongoing
      212-Feb-25Update 2150Completed
      331-Jan-25Update 3200Ongoing
      432-Feb-25Update 4200Ongoing

       

      So, the expectation is, when User filter ALL Date Column, visuals should display 1 Ongoing and 1 Completed

      While if the user select January, it should be 2 Ongoing case 0 Completed

      The issue is i can use Measure but i want to use card to visualize the number of case and values where i can filter using just Status.
      So i have to use calculated column where the expected results is:

       

      When no filter is selected:

      IDLinkedIDDateStatusUpdateValuesIssueStatusLatest Status
      111-Jan-25Update 1100OngoingCompleted
      212-Feb-25Update 2150CompletedCompleted
      331-Jan-25Update 3200OngoingOngoing
      432-Feb-25Update 4200OngoingOngoing

       

      But when January is Selected (The table is filtered)

       

      IDLinkedIDDateStatusUpdateValuesIssueStatusLatest Status
      111-Jan-25Update 1100OngoingOngoing
      331-Jan-25Update 3200OngoingOngoing

      Is this possible?

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

    HI IkmalFikri900 
    The file shared by Ashish_Excel  provides accurate results as per the request.
    To display 200 in your card, I would recommend using Latest measure where it will correctly display the expected value.
    See below image for reference-


    Reuploadiing the pbix for reference.

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
    Best Regards,
    Community Support Team _ C Srikanth.

     

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

    Hi IkmalFikri900 

    We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
    Thank you.

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
    Best Regards,
    Community Support Team _ C Srikanth.

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

    Hi IkmalFikri900 

    It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
    If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
    Looking forward to your reply!

    Best Regards,
    Community Support Team _ C Srikanth.