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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
akk0091
New Member

Dynamic Horizontal reference line linked to Slicer

Hi,

 

My first post here. I'm also new to Power BI / DAX and haven't been able to find a solution to the below:

 

- I've got a line and clustered column chart (hence no analytics pane options for constant line)

- Columns show revenue per day

- I need a horizontal constant line to show daily revenue targets that is dynamically linked to slicer/filter for revenue by Contract type/code

- I've used this DAX formula: 

 
Revenue Target =
IF(
ISFILTERED('Revenue & Orders'[ContractCode]),
SELECTEDVALUE ('Revenue & Orders'[Rev.Target]),
SUM(RevenueTargets[RevenueTarget])
)

 

- The above is working fine with either "Select all" or select one contract code on the slicer but when you select more than one contract type/code then it doesn't work, i.e. doesn't sum up rev.target for just those two, three, or however many contract codes. 

- For example,

            - if I select Contract A on the slicer, a constant line at 3,000 apears on the chart

            - if I Select all on the slicer, a constant line at 9,000 apears on the chart, but

            - But if I select, say, Contract A and C on the slicer, I would want to see a constant line at 5,500 to apear on the chart (sum of A and C), but that's not happening

Please help!

Contract codeRev.Target
A            3,000
B            2,000
C            2,500
D            1,000
E                500
Total            9,000
3 REPLIES 3
akk0091
New Member

Revenue i.e. the "blue" columns need to change when selecting various Contract codes on the slicer. your stays static

correct, there is no obvious way to join the tables.

 

lbendlin_0-1697209513630.png

 

lbendlin
Super User
Super User

not sure where the issue is?

 

lbendlin_0-1696025451113.png

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.