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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

To add a constant line for different values present in a slicer

data.png    I have a slicer in which there are two values. I want to add the same constant line for other value in the slicer. So that now it is at 80%. If i select another value in filter it shows 85%. Thanks. 

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use Line and stacked column chart to work around. Here we should create two measures as below.

Measure 2 = var b = CALCULATE(SUM('Table'[per]),ALLEXCEPT('Table','Table'[name]))
var a = SUM('Table'[per])
return
DIVIDE(a,b)
Measure 3 = var sele = SELECTEDVALUE(slicer[slicer])
return
IF(ISBLANK(sele),BLANK(),IF(sele="a",0.8,0.85))

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thank you for the solution but i need this thing in 100% stacked column chart. If you have any idea. 

Hi @Anonymous ,

 

Based on my research, it is not supported yet currently to add a measure in Constant trend line. There is an idea about that you can vote it up to make this feature coming sooner.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33490639-constant-trend-line-as-a-measure

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.