Forum Discussion
Creating a new table to fix a calculation
- Anonymous8 years ago
HI motyagi,
For your requirement ,you can use var function to store this summary table into measure formula.
If you need to lookup specific value from that table, I'd like to suggest write other variables to get current row contents, then use these variables as filter parameters on above table and use try to summary them with single value.
Sample:
Measure= VAR _current = Table2[Type] VAR temp = ADDCOLUMNS ( SUMMARIZE ( 'Sample Upload File', 'Sample Upload File'[Project Type], "Diff", [$Difference_final], "Balance Conversion", CALCULATE ( SUM ( 'Non-Invoiceable CY by Project Type'[Balance Comparison] ), ALL ( 'Sample Upload File'[Project Type] ) ) ), "Result", IF ( ABS ( [Difference ] ) > [Balance], "Out", "Within" ) ) RETURN MAXX ( FILTER ( temp, [Project Type] = _current ), [Result] )Regards,
Xiaoxin Sheng
But my problem is that when I pull the measure from the old table to a new table ( to fx this by project type) it gives me a different value
HI motyagi,
For your requirement ,you can use var function to store this summary table into measure formula.
If you need to lookup specific value from that table, I'd like to suggest write other variables to get current row contents, then use these variables as filter parameters on above table and use try to summary them with single value.
Sample:
Measure=
VAR _current = Table2[Type]
VAR temp =
ADDCOLUMNS (
SUMMARIZE (
'Sample Upload File',
'Sample Upload File'[Project Type],
"Diff", [$Difference_final],
"Balance Conversion", CALCULATE (
SUM ( 'Non-Invoiceable CY by Project Type'[Balance Comparison] ),
ALL ( 'Sample Upload File'[Project Type] )
)
),
"Result", IF ( ABS ( [Difference ] ) > [Balance], "Out", "Within" )
)
RETURN
MAXX ( FILTER ( temp, [Project Type] = _current ), [Result] )
Regards,
Xiaoxin Sheng