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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure for dynamic constant line for stacked column chart

 Hi All,

 

In my stacked column chart I need a constant line with a measure from my dataset, which changes every day.

I read some solutions (workarounds) with a min or max line in this community, however that does not work for me and is not available in the stacked column chart.

 

Any solutions/suggestions will be highly appreciated!

Thanks in advace!

 

Beste regards,

Patrick Posthuma

The Netherlands.

3jrdgemiddelde.PNG

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

c1.png

 

Calendar(a calculated table):

Calendar = CALENDARAUTO()

 

There is a one-to-one relationship between two tables.

 

You may create two measures like below. 'Max value' is to calculate the max value of 'Value' column in the data model. 'Min value' is to calculate the min value of 'Value' column in the data model. 

Max value = 
CALCULATE(
    MAX('Table'[Value]),
    ALL('Table')
)
Min value = 
CALCULATE(
    MIN('Table'[Value]),
    ALL('Table')
)

 

I'd like to suggest you use 'Line and stacked column chart' to display the result.

c2.png

 

Best Regards

Allan

 

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

 

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

c1.png

 

Calendar(a calculated table):

Calendar = CALENDARAUTO()

 

There is a one-to-one relationship between two tables.

 

You may create two measures like below. 'Max value' is to calculate the max value of 'Value' column in the data model. 'Min value' is to calculate the min value of 'Value' column in the data model. 

Max value = 
CALCULATE(
    MAX('Table'[Value]),
    ALL('Table')
)
Min value = 
CALCULATE(
    MIN('Table'[Value]),
    ALL('Table')
)

 

I'd like to suggest you use 'Line and stacked column chart' to display the result.

c2.png

 

Best Regards

Allan

 

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

 

 

amitchandak
Super User
Super User

@Anonymous 

You can create a static measure

 

New Measure = 10

Or you can use a few options from analytics section

Anonymous
Not applicable

Sorry I do not understand you, a static measure is not what i am looking for.

The constant line must have the value of a column in  my dataset.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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