cancel
Showing results for
Did you mean:
Frequent Visitor

## Create constant measure that only varies with date by ignoring other filters and categories

In this example I have:
The light blue bar is the number of hours the classroom has been used
The dark blue bar is the maximum capacity of hours the room can be used.

When I separate the chart by categories it doesn't give me the correct value (it should be 250)

In this example I wanted to have a constant row worth 250 for all categories, but how

1 ACCEPTED SOLUTION
Community Support

According to your description, I can roughly understand your requirement, I think you can use a measure to achieve the expected result:

``````Constant value =

var _period=DATEDIFF(MIN('Date'[Date]),MAX('Date'[Date]),DAY)

return

_period*10``````

Then place the column chart like this:

And you can get what you want.

If you want to have a constant line in the chart, you can go to the “Analytics” pane to add it, but it has to be static:

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

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

2 REPLIES 2
Community Support

According to your description, I can roughly understand your requirement, I think you can use a measure to achieve the expected result:

``````Constant value =

var _period=DATEDIFF(MIN('Date'[Date]),MAX('Date'[Date]),DAY)

return

_period*10``````

Then place the column chart like this:

And you can get what you want.

If you want to have a constant line in the chart, you can go to the “Analytics” pane to add it, but it has to be static:

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

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

Super User III

@luizpassamani without knowing how you are calculating blue bar it is not easy to answer. Read this post to get your answer quickly.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Announcements

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.