Forum Discussion
sur27078
1 year agoRegular Visitor
How to calculate % from single column
I'm currently working with a General Ledger (GL) dataset that includes only the following columns: Year, GL Account, Cost Center, Month, and Balance. I’ve created a visual card that filters data bas...
- 1 year ago
sur27078 You should be able to do something like the following:
Gross Margin % = VAR _TotalRevenue = CALCULATE( SUM( 'Table'[Balance]), ALL( 'Table' ) ) VAR _GrossProfit = CALCULATE( SUM( 'Table'[Balance] ), FILTER( ALL( 'Table' ), [GL_Account] IN { "5014", "4508" } ) ) VAR _Return = DIVIDE( _GrossProfit, _TotalRevenue, 0 ) RETURN _ReturnYou would need to modify this for whatever your GL_Account codes are for however you are filtering your Revenue and Gross Profit card visuals.
sur27078
1 year agoRegular Visitor
GeraldGEmerick THANK YOU SO MUCH. it's working.
GeraldGEmerick
Memorable Member
1 year agosur27078 Very glad to hear!