cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Jeffrey_VC
Helper II
Helper II

constant line based on filter

Hello,

 

I'm trying to use a constant line into a stacked bar chart.

I want that the constant line is dynamic based on an filter.

 

This filter had three different values

  1. Normal
  2. Calamity
  3. Urgent

If I select for example "Urgent" the constant line must be 98% and when selected "Normal" the constant line must be 93%.

Hopefully someone can help me.

 

Jeffrey

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Jeffrey_VC 

you may try something like 

Line =
IF (
NOT ISEMPTY ( 'Table' ),
SWITCH (
SELECTEDVALUE ( SlicerTable[Value] ),
"Calamity", 0.90,
"Normal", 0.93,
"Urgent", 0.98
)
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Jeffrey_VC 

you may try something like 

Line =
IF (
NOT ISEMPTY ( 'Table' ),
SWITCH (
SELECTEDVALUE ( SlicerTable[Value] ),
"Calamity", 0.90,
"Normal", 0.93,
"Urgent", 0.98
)
)

@tamerj1 
Great! Thank you for your solution. This is working fine.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors