cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Harris021
Regular Visitor

showing the highest date from the date columns

Hi all, 

 

I have a SharePoint list with two columns, Company and Report date. Each company can have a few report dates. Using power bi, how can I show only the maximum date from the list of dates for each company. from below image you can see when I select a company it shows all the available report dates and I only want to show the latest date or have adifferent color.Dates.PNG

 

 

2 REPLIES 2
isabella
Microsoft
Microsoft

Hi @Harris021 

I did a local test ,you can take a reference 

I Create 2 measure ,one is to calculate the maxdate per company,the other one is to calculate the count for the maxdate

 

Here is my test  table

 

isabella_0-1656399184055.png

 

Measure for maxdate: maxdate = CALCULATE(MAX('Table (3)'[date]), ALLEXCEPT('Table (3)','Table (3)'[company]))

 

 

isabella_1-1656399184056.png

 

 

 

Measure for sales  :salesformaxdate = CALCULATE(SUM('Table (3)'[sales]),FILTER('Table (3)','Table (3)'[date]=MAX('Table (3)'[date])))

 

Then in visualization:

 

 

isabella_2-1656399184057.png

 

 

isabella_3-1656399184058.png

 

 

When only select company A

isabella_4-1656399184060.png

 

 

Best Regards,

Community Support Team _Isabella

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

danextian
Super User
Super User

Hi @Harris021 ,

 

You can create a calculated column to determine whether a date is the max date for a particular item and use this to filter a measure, a visual, a page or the entire report. Example:

Max Date = 
CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Company] ) ) = 'Table'[Date]

danextian_0-1655880590405.png

 






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

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors