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
Omarion84
Frequent Visitor

Dax Command to display a group with the lowest #

I have this measure that works fine on a card visual, displaying TOP funded group name, yet I need to add another card, to display the least funder group, anyone know what should I change in this formula or use a different command?
 
Top Funded Group= FIRSTNONBLANK(Topn(1,values('Unique Data Per Order'[Group]),[Total Funded]),1)
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Omarion84 ,

 

Top Funded Group= FIRSTNONBLANK(Topn(1,values('Unique Data Per Order'[Group]),[Total Funded]),0)

Try changing the sorting, replacing 1 with 0, and the ascending order will change to descending.

order Is used to your expression either ascending (ASC, or TRUE, or 1) or descending (DESC, or FALSE, or 0) order. It is an optional.

vstephenmsft_0-1690793066513.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @Omarion84 ,

 

Top Funded Group= FIRSTNONBLANK(Topn(1,values('Unique Data Per Order'[Group]),[Total Funded]),0)

Try changing the sorting, replacing 1 with 0, and the ascending order will change to descending.

order Is used to your expression either ascending (ASC, or TRUE, or 1) or descending (DESC, or FALSE, or 0) order. It is an optional.

vstephenmsft_0-1690793066513.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

 

 

Omarion84
Frequent Visitor

There is BottomN command is dax... 

BiAnalyst
Frequent Visitor

LASTNONBLANK & BottomN should get you the result,
 
Least Funded Group = LASTNONBLANK(BottomN(1, VALUES('Unique Data Per Order'[Group]), [Total Funded]), 1)

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.