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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rubal
Helper II
Helper II

Help with a measure formula

Hi, 

 

I have a measure which identifies the "Project Name", based on the "Project Priority Score" (the lowered the score is the highest priority).

 

Top Ranked Project v2= CALCULATE(SELECTEDVALUE('PowerBi Data Export'[Project Name]),TOPN(1,ALLSELECTED('PowerBi Data Export'),'PowerBi Data Export'[Project Priority Score], ASC))

 

This formula is working fine. However, I would like to show the "Status" of the project along with the "Project Name". Ideally Project Status would come in a new line. Any idea how to modify the formula?

 

Any help would be appreciated. Thanks.

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Rubal

 

I‘m not sure whether you wanna show as below?

Annotation 2020-04-30 130816.png

If so,just modify your measure as below:

 

Top Ranked Project v2= CALCULATE(SELECTEDVALUE('PowerBi Data Export'[Project Name])&"-"&SELECTEDVALUE('PowerBi Data Export'[Status]),TOPN(1,ALLSELECTED('PowerBi Data Export'),'PowerBi Data Export'[Project Priority Score], ASC))

 

If it is not what you need,show me your expected output.

Much appreciated.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @Rubal

 

I‘m not sure whether you wanna show as below?

Annotation 2020-04-30 130816.png

If so,just modify your measure as below:

 

Top Ranked Project v2= CALCULATE(SELECTEDVALUE('PowerBi Data Export'[Project Name])&"-"&SELECTEDVALUE('PowerBi Data Export'[Status]),TOPN(1,ALLSELECTED('PowerBi Data Export'),'PowerBi Data Export'[Project Priority Score], ASC))

 

If it is not what you need,show me your expected output.

Much appreciated.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@Rubal 

If you any data grouping that will change your top N or Rank. As you have already taken the project in the row/group/axis take status as MAX, that will convert it into the measure and it can work

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.