Forum Discussion

GidionStals's avatar
GidionStals
New Member
3 years ago
Solved

Dynamic changing cel if cel is date

Hi,

 

I want to dynamic change a cell in PowerBi.

If a cell is a date, then replace until next empty cell. Than repeat the same for another user.

 

So, under my colleague Betty there are cells with a date. The cell has te change to the name of my colleague, until the next empty cell. After that, there is my colleague Eddy. The same process needs to be done with Eddy as with Betty. The cells will change over time, because they will login more and more.

 

I thought, = if cell is date, than replace with name above until an empty cell. After that, repeat process.

 

Any help is very much appreciated.

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi GidionStals ,

    I have created a simple smaple, please refer to it to see if it helps you.

    Create a column first.

    Column =
    VAR _a =
        MAXX (
            FILTER ( 'Table', [Index] <= EARLIER ( 'Table'[Index] ) && [name] = "" ),
            [Index]
        )
    VAR _b =
        MINX (
            FILTER (
                'Table',
                [Index] <= EARLIER ( 'Table'[Index] )
                    && [Index] > _a
                    && NOT ( CONTAINSSTRING ( [name], "/" ) )
            ),
            [name]
        )
    RETURN
        _b
    

     

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi GidionStals ,

    I have created a simple smaple, please refer to it to see if it helps you.

    Create a column first.

    Column =
    VAR _a =
        MAXX (
            FILTER ( 'Table', [Index] <= EARLIER ( 'Table'[Index] ) && [name] = "" ),
            [Index]
        )
    VAR _b =
        MINX (
            FILTER (
                'Table',
                [Index] <= EARLIER ( 'Table'[Index] )
                    && [Index] > _a
                    && NOT ( CONTAINSSTRING ( [name], "/" ) )
            ),
            [name]
        )
    RETURN
        _b
    

     

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

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