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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sp_nokia_nz
Frequent Visitor

extracting first and last entries between dates

I want to achieve the following and wondering if it is even possible with power BI

There is a database that maintains all the historic changes to various servers in the network.

I want to be able to generate a report that gives me an the from and to value for a server change between a given period. Eg Refer the table below:

 

Server_namedate of changeoriginal valuenew value
server_104-10-2019change_1change_2
server_104-12-2019change_2change_3
server_104-1-2020change_3change_4
server_104-2-2020change_4change_5

 

If I want to see the change on server_1 in the last 4 months (or a between two dates using a filter option),  the result must be:

 

Server_nameoriginal valuenew value
server_1change_1change_5

 

Is this possible with any of the formula in power BI?

 

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @sp_nokia_nz ,

 

Please check if this is what you want:

 

Create measures like so:

Original Value Measure = 
CALCULATE (
    MIN ( 'Table'[original value] ),
    FILTER ( 'Table', 'Table'[date of change] = MIN ( 'Table'[date of change] ) )
)
New Value Measure = 
CALCULATE (
    MAX ( 'Table'[new value] ),
    FILTER ( 'Table', 'Table'[date of change] = MAX ( 'Table'[date of change] ) )
)

server.gif

 

 

Best Regards,

Icey

 

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
Icey
Community Support
Community Support

Hi @sp_nokia_nz ,

 

Please check if this is what you want:

 

Create measures like so:

Original Value Measure = 
CALCULATE (
    MIN ( 'Table'[original value] ),
    FILTER ( 'Table', 'Table'[date of change] = MIN ( 'Table'[date of change] ) )
)
New Value Measure = 
CALCULATE (
    MAX ( 'Table'[new value] ),
    FILTER ( 'Table', 'Table'[date of change] = MAX ( 'Table'[date of change] ) )
)

server.gif

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors