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
harshagraj
Post Partisan
Post Partisan

Conditional Column on Live Connection

Hello all I am using a live connection(Direct Query Mode)

I have a Measure I,e

Skill Index = DIVIDE(AVERAGE('SA USER_RATING'[Final_User_Rating]),
AVERAGE('SA USER_RATING'[MANAGER_EXPECTATIONS])
,0)
Now I need a Stacked Bar to show who are Critical and Not Critical. Critical is Skill Index <=0.5. 
I tried creating a Calculated Column But I am getting an error saying On Direct Mode I can't use Average. 
Please help me what is the other way to achieve this.
I need to filter some table based on stacked bar.I,e Critical / Not Critical.
UserFinal User Rating Manager ExpectationSkill Index
ABC230.666666667
BCD422
EFG130.333333333
5 REPLIES 5
Icey
Community Support
Community Support

Hi @harshagraj ,

 

Try this:

 

1. Enter data to create a Critical table.

critical.PNG

 

2. Create a measure.

Measure =
VAR Critical_ =
    IF ( [Skill Index] <= 0.5, "Critical", "Not Critical" )
RETURN
    IF ( MAX ( Critical[Column1] ) = Critical_, [Skill Index] )

 

3. Create a Stacked column chart.

stacked.PNG

 

 

Best Regards,

Icey

 

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

Hi @Icey thank you for the reply! It is working but I need to achieve this like in the below image.
Live2.JPG
The above one i did it in Extract mode. There i could able to achieve in Column.
Below are the formulas i have used.

[Measure] User & Comp LOD =
CALCULATE([Skill Index],
ALLEXCEPT('SA USER_RATING','SA USER_RATING'[COMPETENCY_L1_NAME],'SA USER_RATING'[USER_DN]))

[Measure] Skill Flag_ =
var critical_=
CALCULATE(IF([User & Comp LOD]>=0 && 'SA USER_RATING'[User & Comp LOD]<=0.4,"Far",
IF([User & Comp LOD]>0.4 && [User & Comp LOD]<=0.7,"Below",
IF([User & Comp LOD]>0.7 && [User & Comp LOD]<1,"Achievers",
IF([User & Comp LOD]>=1,"Star")))),ALLEXCEPT('SA USER_RATING','SA USER_RATING'[COMPETENCY_L1_NAME],'SA USER_RATING'[USER_DN]))
Return
IF(MAX('Table'[Column1])=critical_,'SA USER_RATING'[User & Comp LOD])
Live 3.JPGLive3.JPG
LOD to be applied on Competency L1 and User_DN.
 

Hi @harshagraj ,

 

Sorry to reply late.

I'm afraid that my method will not meet your needs. 

 

 

Best Regards,

Icey

amitchandak
Super User
Super User

@harshagraj , Try like

This should work as a measure

DIVIDE(sum('SA USER_RATING'[Final_User_Rating]),sum('SA USER_RATING'[MANAGER_EXPECTATIONS]))

or

new measure =

AVERAGEX('SA USER_RATING', DIVIDE('SA USER_RATING'[Final_User_Rating],'SA USER_RATING'[MANAGER_EXPECTATIONS]))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak thank you. But I cannot use measure in Legend. I need to show critical and not critical.

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.