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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EvertonRR
Frequent Visitor

Calculate a series based on weights of a given period for a time series

Hi guys,

 

I was wondering if it is possible to create a visual like the one below:

 

example.JPG

 

If I select the date 2020-02-07 and the models A, B and C the weights for these Models and Versions on this date would be: 

 
ModelVersionCountweights
AAA321.4%
AB214.3%
AC17.1%
BAA214.3%
BB17.1%
BC17.1%
CAA17.1%
CB214.3%
CC17.1%
 Total14100%

 

I would like to fix these weights, and calculate the weights * AVERAGE(PRICE) for all available dates, i.e. 2020-02-05, 2020-02-06 and 2020-02-07. The plot in the lower right would show the average price of all model+version weighted by the weights calculated on 2020-02-07, or any other date that I chosse on "Select a ref date" filter.

 

You can find the .pbix file in the following link:

https://drive.google.com/file/d/12Fayu0DLzljGeNNUn9mg9BiqxnCKmk6Y/view?usp=sharing


Let me know how to proceed on this problem please.

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @EvertonRR

 

You need 2 measures as below:

 

 

weight = COUNT(Sheet1[Version])/CALCULATE(COUNT(Sheet1[Version]),ALLEXCEPT(Sheet1,Sheet1[Date]))
Measure 2 = 'Sheet1'[weight]*AVERAGE(Sheet1[Price])

 

 

And you will see:

 

Annotation 2020-02-10 170225.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly

Actually, it is not what I am looking for. See image below:

 

example.JPG

The weights for 2020-02-07 sums 100%. I would like to have this same distribution for the other days, so I could multiple these fixed weights by the price average. So for day 2020-02-06, Model A, version AA, it should also be 21.43%, not 7.14%.

Hi @EvertonRR

 

But in other days, the same version with a model has different counts,so do you want to calculate without considering their actual counts?


 
Best Regards,
Kelly

It was the same file, I just added the count column, but I figured out how to solve this. In advanced editor, I grouped by Date and ID, where ID was Model + Version, and then I was able to calculate the weights and keep them fixed for other days. See image below and file attached with solution. Thank you for your help.

example.JPG

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors