Forum Discussion
akhtar0507
4 years agoFrequent Visitor
P&L Help
Hello, I have finally got my report to ressemble an income statement and all my measures are working fine individually. However, when I am summing my cost of sales and cost of sales B, it is retu...
- 4 years ago
Try:
_currentItem = "Total Cost of Sales", CALCULATE( [GL Cost of sales Only], ALL ( GL Segment )) + CALCULATE ( [GL Cost of sales B], ALL ( GL Segment) ))
PaulDBrown
4 years agoCommunity Champion
Right, but can post the code for each measure?
akhtar0507
4 years agoFrequent Visitor
GL Cost of sales Only =
VAR _glGrouping = CALCULATETABLE( 'GL Segment', 'GL Segment'[GL Grouping] = "Cost of Sales")
VAR _netGL = [Net GL]
return
CALCULATE([Net GL],_glGrouping)
GL Cost of sales B =
VAR _glGrouping = CALCULATETABLE('GL Segment', 'GL Segment'[GL Grouping] = "Cost of Sales B")
VAR _netGL = [Net GL]
return
CALCULATE([Net GL],_glGrouping)
and for [Net GL] = sum(Debit) - sum(Credit) from the GL table.
- PaulDBrown4 years agoCommunity Champion
Try:
_currentItem = "Total Cost of Sales", CALCULATE( [GL Cost of sales Only], ALL ( GL Segment )) + CALCULATE ( [GL Cost of sales B], ALL ( GL Segment) ))- akhtar05074 years agoFrequent Visitor
Hello PaulDBrown,
Big thumps up for your input.
Works like a charm 😄