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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ScottPat
Frequent Visitor

Measure to divide each data point by the earliest visible data point

Probably an easy one for someone out there.

 

I have some time series data and I want a measure where it forces the result to be 1 on the first time shown in the graph.

 

So basically it would show the value of the items divided by the first date visible in the report. And when I change the slider to show other dates it changes the value it is dividing by to the one for that start date.

 

I was using this formula in a column - but this just refers to the first EVER date as opposed to the first visible one.  

 

LME N = [LME]/calculate(average([LME]) ,filter('Copper',[Date]= min([Date])))

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ScottPat , Try like

 

LME N =
var _min = minx(allselected('Copper'), [Date])
return

[LME]/calculate(average([LME]) ,filter('Copper',[Date]= _min))


prefer a date table joined with date of your table


LME N =
var _min = minx(allselected('Date'), [Date])
return

[LME]/calculate(average([LME]) ,filter('Date',Date[Date]= _min))

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
ScottPat
Frequent Visitor

Now I get " the value for 'LME' cannot be determined."

 

I guess this is about row context but not sure how to fix - i ofcourse want the LME value to use each time periods value.

@ScottPat , My mistake LME is a measure

 

LME N =
var _min = minx(allselected('Copper'), [Date])
return

divide([LME], calculate(averagex(Values('Copper'[Date]), [LME]) ,filter('Copper',[Date]= _min)) )

 

or

 

LME N =
var _min = minx(allselected('Copper'), [Date])
return

divide([LME], calculate(averagex('Copper', [LME]) ,filter('Copper',[Date]= _min)) )

 

or use a avg measure

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

No LME is a column not a measure (with the sigma / Sum icon) - so it still doesn't seem quite right in my context.

OK I see what i needed, I had a filter context I needed to remove with

all()
amitchandak
Super User
Super User

@ScottPat , Try like

 

LME N =
var _min = minx(allselected('Copper'), [Date])
return

[LME]/calculate(average([LME]) ,filter('Copper',[Date]= _min))


prefer a date table joined with date of your table


LME N =
var _min = minx(allselected('Date'), [Date])
return

[LME]/calculate(average([LME]) ,filter('Date',Date[Date]= _min))

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.