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
saivina2920
Post Prodigy
Post Prodigy

How to exclude blank and other values in the calculate measure

I have the following measure.

I just want to exclude and "Others" values in the calculate measure.

How to do this...?

below is my current measure.

var working = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Dep-A]= "working"
&& Table1[Region]=sel))
 
I have added the below condition. but, it is not working.
var working = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Dep-A]= "working"
&& NOT(Table1[Dep-A]= "Others") && (Table1[Dep-A] <> BLANK()) && Table1[Region]=sel))
 
How to exclude the blank and other values from the calculation filter.
 
below is the column value to filter.
Dep-A
Working
 
Not Working
Working
Not Working
 
Working
Working
Not Working
Working
Others
 
Others
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @saivina2920 ,


Step 1: Create a new measure

 

M_Dept-A 2 = 

CALCULATE(
    COUNT(DummyTable[Dept-A]),
    KEEPFILTERS(
        DummyTable[Dept-A] <> "" &&
        DummyTable[Dept-A] <> "Others")
)

 


Step 2 : Visualize

Dax_Noob_0-1663032294194.png


Hope that helps

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@saivina2920 

Please try

Test = 

CALCULATE(
    COUNTROWS(Sheet1),
    FILTER(ALL(Sheet1[Column1]),
    Sheet1[Column1] <> ""),
    Sheet1[Column1] <> "Others")


If this helps, please mark this as a solution

BR

Dax_noob

Sorry. it's not working...showing syntax error.

Anonymous
Not applicable

Hi @saivina2920 

Could you paste your code here.

Dax_Noob_0-1662974664775.png


Regards

 




Hi @Anonymous ,

Thanks for your help,

i am trying to form donut chart using the above measure.

But, i don't want to show the "others" and blank in the donut chart.

How to remove the blank and "others" in the donut chart.

pls. find the below url for reference file.

https://1drv.ms/u/s!AiSRcgO5FUmN8XJ-eOtEUgea8stk?e=LGj1rb 

Hi @Anonymous ,

Can you pls. correct the measure which is attached my file with this..

this is very important.

Anonymous
Not applicable

Hi @saivina2920 ,


Step 1: Create a new measure

 

M_Dept-A 2 = 

CALCULATE(
    COUNT(DummyTable[Dept-A]),
    KEEPFILTERS(
        DummyTable[Dept-A] <> "" &&
        DummyTable[Dept-A] <> "Others")
)

 


Step 2 : Visualize

Dax_Noob_0-1663032294194.png


Hope that helps

Yes. It's perfect...Thanks...

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.