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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Average of first month as baseline

Hey there,

 

assume, I have a table Testdata with Products and Regions and prices changing every month. So, it would look like this

 

RegionProductDatePrice
A1A01.01.20231
B1A01.01.20231.6
A2B01.01.20232.8
B2B01.01.20233
A1A01.02.20231.5
B1A01.02.20232.1
...   

 

I want to show the developement of average prices per product over the time. I usually create date-dimension-tables based on my data ranging from startofyear(Testdata[Date]) to endofyear(Testdata[Date]) in my datamodels.

Developement of average prices should be displayed absolutely (no problem), but also relatively. Therefore, I would like to have a measure calculating the average price in the first month of my data, no matter wich month is displayed.

 

I tried:

AV_Start = CALCULATE(AVERAGE(testdata[price]), Filter(ALLSELECTED(testdata[Date]), testdata[Date]=MIN(Testdaten[Date])))
and several similar statements. But values keep changing over my timeline, which I don't want them to.
Could anybody help?
 
(I will be online on monday again, so don't bother if, in the meantime, I won't answer if your suggestions have worked .)
3 REPLIES 3
Anonymous
Not applicable

Hey there,

 

thanks for your replies! Unfortunately, I failed in loading up testdata this morning.

I tried your solution, Bea, but it didn't work. Seems logical to me, but doesn't turn up with the expected result.

But this did work:

AV_Start = CALCULATE(
Average(Testdata[Price]),
FILTER(
ALLEXCEPT(Testdata, Testdata[Product]),
Testdata[Date]=Min(Datedimension[Date])
)
)
But it only worked by using the date-hierarchy from the testdata-table in the visual, not the hierarchy from the datedimension-table.
 
Another formula that also worked with the date-dimension-table is:
AV_Start= CALULATE(
AVERAGE(tesdata[price]),
DATEADD(
datedimension[date]),
DATEDIFF(MIN(testdata[date]),
CALCULATE(MIN(datedimension[date]), all(datedimension)),
MONTH
),
MONTH
)
)
 
 
BeaBF
Super User
Super User

@Anonymous Try with:

AV_Start =
CALCULATE(
AVERAGE(Testdata[Price]),
FILTER(
ALL(Testdata[Date]),
Testdata[Date] = MIN(Testdata[Date])
)
)

BBF

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely.

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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