cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Shalin Frequent Visitor
Frequent Visitor

Show first value by date

I have a report showing products that are on purchase order, basically:

Item, PO Number, Date due, Status. 

 

I have a page level filter on status so that it only shows Orders with the right status of outstanding. I want to show the first PO number only, based on earliest date due, per item number. Is that possible? 

 

So eg. If one item is on 2 different PO's, one due tomorrow and one next week, I would want the report to only give the PO number of the order due tomorrow, not next week

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-cherch-msft
Microsoft

Re: Show first value by date

Hi @Shalin

 

You may create a measure and then drag it to visual level filter. Attached the sample file for your reference.

First =
IF (
    MAX ( 'Table'[Date due] )
        = MINX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Item] = MAX ( 'Table'[Item] ) ),
            'Table'[Date due]
        ),
    1
)

Regards,

Cherie

Community Support Team _ Cherie Chen
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

2 REPLIES 2
Super User
Super User

Re: Show first value by date

Yes, but difficult to be specific without sample data. 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

 

That being said, generally you are going to use VAR to create a temp table of your PO's, use MINX to identify the minimum date in that table and then use MAXX or other aggregation against FILTER of your temp table where the date would equal the value from your MINX.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Microsoft v-cherch-msft
Microsoft

Re: Show first value by date

Hi @Shalin

 

You may create a measure and then drag it to visual level filter. Attached the sample file for your reference.

First =
IF (
    MAX ( 'Table'[Date due] )
        = MINX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Item] = MAX ( 'Table'[Item] ) ),
            'Table'[Date due]
        ),
    1
)

Regards,

Cherie

Community Support Team _ Cherie Chen
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

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (3,457)