Forum Discussion

selpaqm's avatar
selpaqm
Icon for Helper V rankHelper V
4 years ago

if Earlier for text

Hi,

 

I have a data table as below. same customer can be offline and online for different devices. as result table I have to see that 

123 Active

do you have any idea for it?

 

Customer_NoStatus
123Offline
123Offline
123Active
123Offline

3 Replies

  • Hi selpaqm 

     

    Can you add more details to your question?

    Can you post sample data as text and expected output?
    Not enough information to go on;

    please see this post regarding How to Get Your Question Answered Quickly:
    https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.
    4. Relation between your tables

    Appreciate your Kudos!!
    LinkedIn:www.linkedin.com/in/vahid-dm/

  • Hi selpaqm ,

    According to your description, in my understanding, your expected result table is to remove the rows after the last Active status, if it is the case, here's my solution.

    This is my sample data, I add some rows on your basis.

     

    1.Add an index column in Power Query.

    2.Create a new table.

     

    Table 2 =
    FILTER (
        ALL ( 'Table' ),
        'Table'[Index]
            <= MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Status] = "Active" ), 'Table'[Index] )
    )
    

     

    Get the result.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

     

  • Hi selpaqm ,

    Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team _ kalyj