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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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