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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
dofrancis3
Resolver I
Resolver I

Icon

Dear Colleagues;

 

I reach out to you to request your support

1. I have the data set below:

Did you receive your salary?
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes

 

2. this the results of countif:

YesNo
107

 

3. But instead of this kind of results "i would like to have the results below Highlight in green" :

 

dofrancis3_2-1732273431399.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from xifeng_L , please allow me to provide another insight: 
Hi  @dofrancis3 ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
var _table=
SUMMARIZE(
    'Table',[Did you receive your salary?],"Count",COUNTX('Table',[Did you receive your salary?]))
var _yes=
SUMX(FILTER(_table,[Did you receive your salary?]="Yes"),[Count])
VAR _NO=
SUMX(FILTER(_table,[Did you receive your salary?]="No"),[Count])
VAR _table2=
SELECTCOLUMNS(
_table ,
    "Yes",IF(_yes>=_NO,1,0),
    "No",IF(_NO>_yes,1,0))
return
DISTINCT(
    _table2)

2. Result:

vyangliumsft_0-1732500619729.png

 

Best Regards,

Liu Yang

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

Thanks for the reply from xifeng_L , please allow me to provide another insight: 
Hi  @dofrancis3 ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
var _table=
SUMMARIZE(
    'Table',[Did you receive your salary?],"Count",COUNTX('Table',[Did you receive your salary?]))
var _yes=
SUMX(FILTER(_table,[Did you receive your salary?]="Yes"),[Count])
VAR _NO=
SUMX(FILTER(_table,[Did you receive your salary?]="No"),[Count])
VAR _table2=
SELECTCOLUMNS(
_table ,
    "Yes",IF(_yes>=_NO,1,0),
    "No",IF(_NO>_yes,1,0))
return
DISTINCT(
    _table2)

2. Result:

vyangliumsft_0-1732500619729.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

xifeng_L
Super User
Super User

Hi @dofrancis3

 

You can try the svg to generate the icon, such as:

 

xifeng_L_0-1732295775095.png

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Dear @xifeng_L From my on of the colomns that i have i my data set I would like : from this colomn (Dit you receive your salary) to get table Highlight in yellow below.

dofrancis3_0-1732306965657.png

 

You can try below calculated table expression.

 

xifeng_L_0-1732375907982.png

 

Table 2 = 
SELECTCOLUMNS(
    SUMMARIZECOLUMNS('Table'[Did you receive your salary?],"Salary",COUNTROWS('Table')),
    "Salary",IF('Table'[Did you receive your salary?]="Yes",[Salary],0)
)

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Dear @xifeng_L thank you for your replay but how can i display also 0 in this table?

dofrancis3_0-1732377277995.png

 

dofrancis3
Resolver I
Resolver I

Or is there another way to get the same results that can allow me to use the Icon? because i would like to use ICON instead of number.

dofrancis3_0-1732275566288.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.