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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
khush19
Resolver I
Resolver I

Top N in Donut chart

I have data

 

In my donut chart i only want o show AMOUNT  with latest Date .

I tried using top N but it works sometimes but dnt return anything most of time.

i tried using measure 

Calculate (SUM(Amount),FILTER(table,currenttime>= max(currenttime)))

but none is working

CurrenttimeAreaiDAmount
13/04/2022 10:14:00 AM110
13/04/2022 10:14:00 AM220
13/04/2022 09:14:00 AM110
13/04/2022 09:14:00 AM320
1 ACCEPTED SOLUTION

Earlier the date was passed as format 03/14/2000 mm/dd/yyyy hh:mm:ss

 

changed to 

dd/mm/yyyy hh:mm:ss

 

khush19_0-1649826244879.png

and it is working,not sure why it was failing before

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Please show the expected result in a Table format.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@khush19 , Try a measure like

 

M1=
var _max = maxX(allselected(Table), Table[currenttime])
return
Calculate (SUM(Amount),FILTER(table,[currenttime]>= _max))

or


M1 =
var _max = datevalues(maxX(allselected(Table), Table[currenttime]))
return
Calculate (SUM(Amount),FILTER(table,datevalues([currenttime])>= _max))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi Amit,

 

Tried the measure but it didnt worked

Earlier the date was passed as format 03/14/2000 mm/dd/yyyy hh:mm:ss

 

changed to 

dd/mm/yyyy hh:mm:ss

 

khush19_0-1649826244879.png

and it is working,not sure why it was failing before

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.