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
admin11
Memorable Member
Memorable Member

Sales Table how to remove Other Row from Table ?

Hi All

 I have below expression working fine :-

 

BRAND_P =
IF ( 'SALES'[BRAND_] = Blank(),
"No Brand",if(SALES[BRAND_] in
{"UNIVERSAL"," Universal Robot","Universal Robot"},
'SALES'[BRAND_], "Other"))
 
it will return below table :-
admin11_0-1655346794552.png

Now my task is to remove the row which display Other . I try to modify the expression to below :-

 

BRAND_P_ =
IF ( 'SALES'[BRAND_] = Blank(),
"No Brand",if(SALES[BRAND_] in
{"UNIVERSAL"," Universal Robot","Universal Robot"}))
 
But I get error msg below  , can some one share with me where i go wrong ?
 
Too few arguments were passed to the IF function. The minimum argument count for the function is 2.
 
Paul
1 ACCEPTED SOLUTION

@admin11 , Is that what you need?

 

BRAND_P_NEW =
IF (
'SALES'[BRAND_] = BLANK (),
"No Brand",
IF (
SALES[BRAND_] IN { "UNIVERSAL", " Universal Robot", "Universal Robot" },
'SALES'[BRAND_]
)
)

View solution in original post

5 REPLIES 5
SivaMani
Resident Rockstar
Resident Rockstar

@admin11, there are a couple of ways to do it.

  1. Add report/page/visual level filter on Brand column(exclude Other)
  2. In the Sales YTD Measure, Add the below filter
CALCULATE(<YTD Logic>,KEEPFILTERS('SALES'[BRAND_P] <> "Other"))

 

Hope this helps!

amitchandak
Super User
Super User

@admin11 , The first one is correct as a new column. if you want to remove others, you need to use a measure or use the page or visual level filter <> other

 

calculate([sales YTD], filter(Table, Table[BRAND_P_]<> "Other")

 

Assumed that sales YTD is a measure

@amitchandak @SivaMani 

Thank you both for sharing .

 

I am sorry , it is my explanation is not clear to all of you.

what i want is :-

 
I have below expression , which return  , "UNIVERSAL"," Universal Robot","Universal Robot" sales , and it also return Other sales at row one :-

BRAND_P =
IF ( 'SALES'[BRAND_] = Blank(),
"No Brand",if(SALES[BRAND_] in
{"UNIVERSAL"," Universal Robot","Universal Robot"},
'SALES'[BRAND_]"Other"))
 
My question is , how can i modify the above expression , by remove those i have high lighted script in red , so that the report will not display other sales :-
 
BRAND_P_NEW =
IF ( 'SALES'[BRAND_] = Blank(),
"No Brand",if(SALES[BRAND_] in
{"UNIVERSAL"," Universal Robot","Universal Robot"},
'SALES'[BRAND_], "Other"))
 
Some how when i remove those red highlighted script , i get error,
 
Paul 

@admin11 , Is that what you need?

 

BRAND_P_NEW =
IF (
'SALES'[BRAND_] = BLANK (),
"No Brand",
IF (
SALES[BRAND_] IN { "UNIVERSAL", " Universal Robot", "Universal Robot" },
'SALES'[BRAND_]
)
)

@SivaMani 

Thank you it work fine

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.