Forum Discussion
calculate account gp
- 7 years ago
Hi Anonymous,
To create a measure as below.
Measure = VAR sum2 = CALCULATE ( SUM ( Table1[amount] ), FILTER ( Table1, Table1[account code] = 15999 ) ) VAR sum1 = CALCULATE ( SUM ( Table1[amount] ), FILTER ( Table1, Table1[account code] = 58999 ) ) RETURN sum2 / sum1For more details, please check the pbix as attached.
Regards,
Frank
I need to calculate the amount associated to account code 15999 / amount associate with 58999 associated to company 1 (456/4456)
I need to calculate the amount associated to account code 15999 / amount associate with 58999 associated to company 0 (10/566)
you can create a measure like:
Measure0 = divide(
calculate(sum(accounts[amount]),accounts[account code] = 15999, accounts[company] = 0),
calculate(sum(accounts[amount]),accounts[account code] = 58999, accounts[company] = 0),
0)
Measure1 = divide(
calculate(sum(accounts[amount]),accounts[account code] = 15999, accounts[company] = 1),
calculate(sum(accounts[amount]),accounts[account code] = 58999, accounts[company] = 1),
0)
- Anonymous7 years agoNot applicable
on the example i put just 2 companies but i got more than 50 soi need measure to calculate for each company, making a measure for each company its not gonna work