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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
darko861
Resolver II
Resolver II

Return a text value from a calculated column with DAX

Hi community,

 

I have written the below Dax measure, this does not work due to the string highlighted in red. PUFIRMA[FTG] refers to a calculated column in a table. This column contains the names of the companies with the highest sales.

How can I tweak this syntax in order to retrieve the names of the companies in the calculated column? I have tried to wrap it around different functions, like Values(), but I cannot get the desired output. The RANKX works perfectly, but I'm not able to extract the names of the respective company with the highest sales.

 

RankbySales_x3 =
VAR RankbySales2 =RANKX(all(PUFIRMA[FTG]),Measures_T[Rank_sum],,DESC)
return
IF(RankbySales2<=11,PUFIRMA[FTG],"Others")
 
Desired output:
darko861_0-1637684135409.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@darko861 , if you are looking for TOP + other refer this

https://www.youtube.com/watch?v=UAnylK9bm1I

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@darko861 , if you are looking for TOP + other refer this

https://www.youtube.com/watch?v=UAnylK9bm1I

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.

Top Solution Authors