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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors