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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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))

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.