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
Anonymous
Not applicable

Replacing Blank

Hi, I am using couple of "single card visual".For each card visual i am using a different column, these columns have "1" and "0" as value. I am showing count of only "0"s using advanced filter because these are the failure. Now when there are no "0" in a column it returns as "(Blank)". I want to change this "(Blank)" with either "None" OR "0" OR "".

Col1   Col2   Col3
 0         1         1
 0         0         1
 0         1         1
 0         0         1

The Result i get in cards

Card 1= 4 ( count of "0"s, since i have filtered this using "is" in advance filter option.
Card 2= 2 
Card 3= (Blank) (since there are no 0s it is returning (Blank)
I want this blank to be "None" or simply "0" or ""

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous,

Create the following measures in your table.

Count of 0 = CALCULATE(COUNT(Table[Col3]),Table[Col3]=0)
outputmeasure = IF([Count of 0]=BLANK(),"None",[Count of 0])
1.JPG


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yuezhe-msft
Employee
Employee

@Anonymous,

Create the following measures in your table.

Count of 0 = CALCULATE(COUNT(Table[Col3]),Table[Col3]=0)
outputmeasure = IF([Count of 0]=BLANK(),"None",[Count of 0])
1.JPG


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft it worked. however instead of creating 2 measures i nested them together and used it as below

 

Col_Cnt = IF(CALCULATE(COUNT(Table[Col3]),Table[Col3]=0)=Blank(),"None",CALCULATE(COUNT(Table[Col3]),Table[Col3]=0))


Many Thanks 🙂 .

mede
Resolver I
Resolver I

You can just wrap your measure with an IF.

 

Count of zeros = CALCULATE(COUNT(Col1), Col1 = 0)

 

Showing blank if result is 0:

= IF(Count of zeros = 0, BLANK(), Count of zeros)


Let me know if it works.

Anonymous
Not applicable

@mede it isnt working still giving "(Blank)"

i created a measure with 
Sold To_Count = IF(Data[SOLD-TO]=0,BLANK(),Data[SOLD-TO])

 

then in advanced filter i used the following condition (is not 1) and also tried with (is 0).

Hi @Anonymous, i think i might have misunderstood that you need blanks. In  any case, glad that you found a solution.

Anonymous
Not applicable

@Med thanks to you too.

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.