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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Hadrey
Frequent Visitor

Calculating weights against the entire year with a multi-year table

Hi, I need help with create measure to calculate weight of item price relative to 1 year, but I have table with multi-year data something like this

 

(this is a sample and very simplified table)

IDNAMEPRICEYEAR

1

a2002023
2b3002023
1a1002024
1a5402023
1a3002023

output for "a" needed to be something like "0,776" for 2023, its be best to be able to filter in visualize by name or id, but a do not need to visual filter by year because I need to use this weight to other measure like weight for 2023 and weight for 2024 at the same time

 

i'm tired to use answers from other topics but its show's wrong calculations like 2,44 (from orginal model) when should be between 0 and 1

1 ACCEPTED SOLUTION

ok, you can slightly adjust the formula

lbendlin_0-1716839488631.png

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

0.776? Not really.  More like 0.91.

 

lbendlin_0-1716772057335.png

 

It's 0.776 because it's should by like this

XABCDE
1 20232024WEIGHT 2023WEIGHT 2024
2a10401000,77611
3b300 0,2239 

 

B2 is sum of all items "a" from 2023 but in D2, the formula looks like this: =B2 / SUM(B2:B3) and I'm need that weight for 2023 and 2024

ok, you can slightly adjust the formula

lbendlin_0-1716839488631.png

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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