cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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.

1 ACCEPTED SOLUTION
Super User

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.

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

Super User

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.

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

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors