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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ghumarepratik21
Regular Visitor

Sorting

We have two condition here as mention below, in which we are getting expected output for first one but not for second in same table.
In grid table mentioned in pic. below we have compound_type column, the condition is 
1. for column which do not have compound_type as Tread as per 'KPI' value are are sorting colors, and getting expected output,

2. if we get any of KPI value between [KPI]<3 && [KPI]>0 and compound_type is Tread then all values should be Red, we are not getting this conditions satisfied
you can see in pic 2 we have one Tread value as 2.14 still we are getting Green color, can you please check this 
Screenshot (130).pngScreenshot (131).pngScreenshot (132).png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @ghumarepratik21 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi  @ghumarepratik21 

The color will return when in value_if_false. I think this issue shouble be caused by the logic_test: Thread_count.

Try this measure:

 

Kpi_Color_Test = 
VAR _OutPut = IF(Max(Table[compourd_type])<>"Thread",
IF([KPI]>0&&[KPI]<3,"Red",
IF([KPI]>3&&[KPI]<4.3,"Yellow",
IF([KPI]>=4.3,"Lime"))),
IF([KPI]>0&&[KPI]<3,"RED","Green")
)

If this reply still couldn't help you solve your problem, please share a sample with me. I need to know your data model. This will make it easier for me to update the measure.

 

 

Best Regards,

Rico Zhou

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.