cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
siva3012
Helper II
Helper II

move data from 1st cell into 2nd cell downwards

Hi,

I  need to move the data from 1st cell into 2nd cell and leave the 1st cell empty.  

Can anyone guide me in doing this in PowerBI?  I have the screenshot which is required. 

 

aaa.jpg

 

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

Hi @siva3012 ,

 

To create a calculated column as below.

Column = 
VAR d =
    CALCULATE (
        MAX ( 'Table'[Local date Time] ),
        FILTER (
            'Table',
            'Table'[Local date Time] < EARLIER ( 'Table'[Local date Time] )
        )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[Value] ),
        FILTER ( 'Table', 'Table'[Local date Time] = d )
    )

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @siva3012 ,

 

To create a calculated column as below.

Column = 
VAR d =
    CALCULATE (
        MAX ( 'Table'[Local date Time] ),
        FILTER (
            'Table',
            'Table'[Local date Time] < EARLIER ( 'Table'[Local date Time] )
        )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[Value] ),
        FILTER ( 'Table', 'Table'[Local date Time] = d )
    )

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi Siva3012,

 

I've seen a few ways to calculate this. I find that the best way to calculate is creating a calculated column using the DAX formula below:

 

PrevValue = CALCULATE(MAX('TableName'[Value]), ALL('TableName'), 'TableName'[Local DateTime]<EARLIER('TableName'[Local DateTime]))
 
Here is an example that I created:
1.1.PNG
 
Hope this helps!

@Anonymous  : Thanks your reply. I have applied the Dax code, but i am not getting the required output. In some places the value is not the same. I have highlighted data & have herwith attcahed in this screenshot. Can you please have a look at this proof.jpg

 

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors