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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Creating category based on numeric values in another column using IF statement but ignoring totals

Hello Everyone,


I'm trying to create a status category based on if the Won Q3 has a value or not, 

 

my code is pretty straight forward I think, however, at the end of the table, my total shows "won" as the status, how do I remove this?

 

Status = if([Sum Won Q3]<=0,"Not Won","won")

 

bo_wang5_0-1638332426713.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try the below measure.

 

Status =
IF (
HASONEVALUE ( 'yourtablename'[Reference] ),
IF ( [Sum Won Q3] <= 0, "Not Won", "won" )
)


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please try the below measure.

 

Status =
IF (
HASONEVALUE ( 'yourtablename'[Reference] ),
IF ( [Sum Won Q3] <= 0, "Not Won", "won" )
)


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thank you Jihwan,


It worked, have a follow up question. Please see my updated matrix,

 

I created another category for "Forecast Status" based on some additonal logic.  However I'd like to create a sum of "in forcast and won".

 
In forecast and won =
if([Forecast Status]="in forecast",If([Status]="won",[Sum Won Q3],0))

Please advise.  Or I can start a new thread

 

bo_wang5_0-1638335993417.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.