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
sinanalmac
Resolver I
Resolver I

If result big a number writie 'Orther' else Write cloum value


I created A new table  the name is  FuTable .
The  futable  has  two  colums

"FU"  contais product name   and  it is unique

"MesaureDif"  contais  SUM(FuForecast[sales])-SUM(FUforecast[forecast]) .  it feeds from  FuSales table and it has FU colum  also    

FUTable  

FU MeasureDif
A10
B9
C8
D7
E6
F5
G4
H3
K2
L1

 

I added  A Measure and determinate   Top  4  materilal 

 

Top 4 =  RANKX( All(FUTable);FUTable[MeasureDIF])

 

 

When I add     A new mesause  it doesnt work  

for example 

Measure = If(FUTable[TOP10]>4;"Others";FUTable[FU]) 
it is  not accept  FU table[FU]

 

When  I add a new colum . This time Formule  is not write "others " for smaller value  from  4

 

I just  want write "others"  for the product top4  value  less then  4 

 

measure.png

 

 

1 ACCEPTED SOLUTION

Hi All,

I think  I solve  the  issue

Icreate FU  table  for  all calculated  table  "dis2,dis4 ,cum2,cum4"  then it worked .
Thank you all for  your   ideas and solutions

Best  regards 
Sinan 

View solution in original post

10 REPLIES 10
Greg_Deckler
Super User
Super User

When you refer to columns in a measure, you must use an aggregation:

 

Measure = If(MAX(FUTable[TOP10])>4;"Others";FUTable[FU]) 

Seems like you could do this with a group also.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

 

Hi Greg, Thank you  for your Reply,
But The main problem is POwer BI  doesn't suggest the other column. it Only  suggests the calculated column

 

I want Write  FU name on this colum.
Image 15.png

 

 

 

 

 

 

 

 

Image 17.png

 

 

Anonymous
Not applicable

Try with using a SUM function:

 

=If(SUM(FUtable[Top10])>10;"Others",SUM(FUtable[FU]))

Hi @Anonymous
Thank you  for  Repy  but it didn't work. 
 is there a function like 

 
If(SUM(FUtable[Top10])<10"Others",SHOWFIELDVALUE(FUtable[FU]))

I just want to   show   Futable valu  if  top10  Smaller  then 10  
I can  do that With  add column but   there is an  calculate filed  in  the FUTable

How CAn I Atach  my file  in this  message ?
 
Best regards
Anonymous
Not applicable

Can you use a dropbox and share a link to your file ?

Hi again, here is my files link 

https://www.dropbox.com/sh/w4fuymtxiktwlpi/AACRx-JwF2QlVAocqj066qVZa?dl=0

 thank you for  your help 

Anonymous
Not applicable

Hi @sinanalmac,

 

If I understand correctly you want to write the name from FUTable[FU] for you top 10 based on [Sel__ABSDif] is that right?

 

So what's wrong with your current table? You have FU Name in the first column (left hand side) and your "Measure 2" seems to work?

 

If It is just a matter of removing "Others" you can use visual level filters and uncheck "others"

 

If instead of showing "other" you want to show the FU name change your measure to this:

 

Measure 2 = if(FUTable[TOP10]>10,MAX(FUTable[FU]),(SelectI[Sel_ABSDif]))

 

 

 hi @Anonymous thank you for   reply  
 actually this  fucntion gives me excatly  what  I  want 

 

 Measure 2 = if(FUTable[TOP10]>10; "others"; MAX(FUTable[FU]))

But I realized something about the measure.   I can't use a measure in a pie chart as the legend value. I need to solve this issue by creating a column.

 

Hi @sinanalmac

Tranform a measure to  a column

column = if(FUTable[TOP10]>10; "others"; FUTable[FU])

Best Regards

Maggie

Hi All,

I think  I solve  the  issue

Icreate FU  table  for  all calculated  table  "dis2,dis4 ,cum2,cum4"  then it worked .
Thank you all for  your   ideas and solutions

Best  regards 
Sinan 

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.