cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
luizpassamani
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

 

 

luizpassamani_0-1624487614979.png

 

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

Hi, @luizpassamani 

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:

vrobertqmsft_0-1624957835717.png

 

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:

vrobertqmsft_1-1624957835719.png

 

You can download my test pbix file below

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.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @luizpassamani 

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:

vrobertqmsft_0-1624957835717.png

 

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:

vrobertqmsft_1-1624957835719.png

 

You can download my test pbix file below

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.

View solution in original post

parry2k
Super User III
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.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490






Did I answer your question? Mark my post as a solution.

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





Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

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

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors