Forum Discussion
Anonymous
6 years agoNot applicable
Calculated column using data from multiple rows and columns
Hi, I've been stuck at a problem for a while now. I checked multiple other questions like mine but I wasn't able to find the right answer so I thought I'd ask. My situation looks like this: V...
- 6 years ago
Here is one way to approach this in a calculated column. Please try this expression.
Result = VAR index1 = CALCULATE ( MIN ( Frame[Value] ), ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ), Frame[SubIndex] = 1 ) VAR index5 = CALCULATE ( MIN ( Frame[Value] ), ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ), Frame[SubIndex] = 5 ) VAR index6 = CALCULATE ( MIN ( Frame[Value] ), ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ), Frame[SubIndex] = 6 ) RETURN IF ( NOT ( ISBLANK ( index6 ) ), 100 * DIVIDE ( index5, index1 ) / index6 )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- 6 years ago
Hi,
This calculated column formula works
=DIVIDE(DIVIDE(100*CALCULATE(SUM(Data[Value]),FILTER(Data,Data[FrameID]=EARLIER(Data[FrameID])&&Data[Date]=EARLIER(Data[Date])&&Data[SubIndex]=5)),CALCULATE(SUM(Data[Value]),FILTER(Data,Data[FrameID]=EARLIER(Data[FrameID])&&Data[Date]=EARLIER(Data[Date])&&Data[SubIndex]=1))),CALCULATE(SUM(Data[Value]),FILTER(Data,Data[FrameID]=EARLIER(Data[FrameID])&&Data[Date]=EARLIER(Data[Date])&&Data[SubIndex]=6)))Hope this helps.
mahoneypat
6 years agoMicrosoft Employee
Here is one way to approach this in a calculated column. Please try this expression.
Result =
VAR index1 =
CALCULATE (
MIN ( Frame[Value] ),
ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ),
Frame[SubIndex] = 1
)
VAR index5 =
CALCULATE (
MIN ( Frame[Value] ),
ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ),
Frame[SubIndex] = 5
)
VAR index6 =
CALCULATE (
MIN ( Frame[Value] ),
ALLEXCEPT ( Frame, Frame[FrameID], Frame[Date] ),
Frame[SubIndex] = 6
)
RETURN
IF ( NOT ( ISBLANK ( index6 ) ), 100 * DIVIDE ( index5, index1 ) / index6 )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat