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
wolfy_
Helper I
Helper I

Constant line that adaps to the number of day´s selected

Hi, it is possible to add a constant line that adapts to the number of days selected?

 

Every person should do at least 480 minutes in the sum of the different projects that they work.

 

So if I select 3 day I would like the constant line be 480*3 days, 1440 minutes.

If I select 5 day it should be 2440.

 constant line.png

 

Is this possible to implement?

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @wolfy_,

 

Please create measures similar to:

Selected day =
DATEDIFF ( MIN ( 'Data table'[Date] ), MAX ( 'Data table'[Date] ), DAY ) + 1

constant line = [Selected day]*480

1.PNG

 

By the way, it is not able to add a dynamic value like a measure for constant line. You could insert a Line and Stacked column chart, then, add above measure [constant line] to "Line values" section.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, it works partially.

 

I think is is not working properly because we work 24x7 and some workers have day off diferent from others.

 

Nevertheless, it is possible to put the constant line independent of the worker?

 

constantline 5.pngconstantline 3.png

Hi @wolfy_,

 

What do you mean "we work 24x7 and some workers have day off diferent from others."?

 

" it is possible to put the constant line independent of the worker?"

Please try this:

Selected day =
DATEDIFF ( MIN ( 'Data table'[Date] ), MAX ( 'Data table'[Date] ), DAY ) + 1

constant line = CALCULATE([Selected day]*480,ALL('Data table'))

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.