Forum Discussion
Quakker
3 years agoHelper II
Filter on multiple Columns / Values - Data Consolidation
Hi All, i´m struggeling to create a Costcenter Report, where some kind of consolidation has to be done. Attached you can see some sample data. What i want to achieve is: If a User selects...
Anonymous
3 years agoNot applicable
HI Quakker,
You can try to use the following measure formula to get the different based on current COSTCENTER group:
formula =
VAR currCostcenter =
SELECTEDVALUE ( Table[COSTCENTER] )
RETURN
IF (
currCostcenter = BLANK (),
SUM ( Table[Amount] ),
VAR _path =
SUBSTITUTE ( currCostcenter, "-", "|" )
RETURN
CALCULATE (
SUM ( Table[Amount] ),
FILTER ( 'Table', Table[SOURCEOBJECT] & "" = PATHITEM ( _path, 1 ) )
)
- CALCULATE (
SUM ( Table[Amount] ),
FILTER ( 'Table', Table[SOURCEOBJECT] & "" = PATHITEM ( _path, 2 ) )
)
)
Regards,
Xiaoxin Sheng