Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
GidionStals
New Member

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.

 

GidionStals_0-1678347677157.png

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

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

 

vpollymsft_2-1678685251282.png

 

 

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.

View solution in original post

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

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

 

vpollymsft_2-1678685251282.png

 

 

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.