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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
FriedWater
Frequent Visitor

Decreasing Values Based on TODAY()

Hi all,

 

I am trying to create a line chart that will show me the "Units to Go" decreasing every day starting from TODAY() based on the "Average Units/Day" but I am not sure how to start, please help me. Thank you.

 

FriedWater_0-1649248408354.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @FriedWater 

 

Had a calendar table with a column of the relative date then just add the following measure:

Decreasing Value = 
        VAR total_value =
            SUM ( 'Table'[Units to Go] )
                - DIVIDE ( SUM ( 'Table'[Units to Go] ), AVERAGE ( 'Table'[Average Units/Day] ) )
                    * SELECTEDVALUE ( 'Calendar'[RelativeDay] )
        RETURN
            IF ( total_value > 0, total_value )

Be aware that this is a dinamic column and in my calendar table the relative date is calculated based on the difference between today and the date so everyday it changes.

 

MFelix_0-1649411294018.png

I assumed that each row above is a different ID.

 

Check PBIX attach.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @FriedWater 

 

Had a calendar table with a column of the relative date then just add the following measure:

Decreasing Value = 
        VAR total_value =
            SUM ( 'Table'[Units to Go] )
                - DIVIDE ( SUM ( 'Table'[Units to Go] ), AVERAGE ( 'Table'[Average Units/Day] ) )
                    * SELECTEDVALUE ( 'Calendar'[RelativeDay] )
        RETURN
            IF ( total_value > 0, total_value )

Be aware that this is a dinamic column and in my calendar table the relative date is calculated based on the difference between today and the date so everyday it changes.

 

MFelix_0-1649411294018.png

I assumed that each row above is a different ID.

 

Check PBIX attach.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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