Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Good Afternoon,
I am trying to create the following table using DAX:
ID | Index | Value | Pitch | Result |
1 | 1 | 2 | 2 | 2 |
1 | 2 | 4 | 2 | 4 |
1 | 3 | 6 | 2 | 6 |
2 | 1 | 5 | 3 | 3 |
2 | 2 | 7 | 3 | 6 |
2 | 3 | 9 | 3 | 9 |
Result is a calculated column with the following formula when grouped by ID:
Pitch = Value / Index <- for the row with the max value per ID.
Result = Index * Pitch
What is the best way to calculate the Pitch column?
Thank you for your assistance
Solved! Go to Solution.
Hi @thomas_pike
Please do the following https://we.tl/t-JYIy6UCpSM
Pitch =
VAR CurrentIDTable =
CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[ID] ) )
VAR LastIndexRecord =
TOPN ( 1, CurrentIDTable, Data[Index] )
VAR LastIndex =
MAXX ( LastIndexRecord, Data[Index] )
VAR LastValue =
MAXX ( LastIndexRecord, Data[Value] )
RETURN
LastValue / LastIndex
Result = Data[Index] * Data[Pitch]
Hi @thomas_pike
Please do the following https://we.tl/t-JYIy6UCpSM
Pitch =
VAR CurrentIDTable =
CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[ID] ) )
VAR LastIndexRecord =
TOPN ( 1, CurrentIDTable, Data[Index] )
VAR LastIndex =
MAXX ( LastIndexRecord, Data[Index] )
VAR LastValue =
MAXX ( LastIndexRecord, Data[Value] )
RETURN
LastValue / LastIndex
Result = Data[Index] * Data[Pitch]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |