Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
account code | company | amount |
11999 | 0 | 10 |
15999 | 0 | 5 |
53999 | 0 | 75 |
56999 | 0 | 55 |
58999 | 0 | 566 |
69999 | 0 | 74 |
76999 | 0 | 54 |
11999 | 1 | 456 |
15999 | 1 | 2545 |
53999 | 1 | 445 |
56999 | 1 | 4545 |
58999 | 1 | 4456 |
69999 | 1 | 45 |
76999 | 1 | 45 |
given this table with account code company and amount
, i want be able to calculate for example for each company
the measure of account code 15999/58999
how i can do that?
Solved! Go to Solution.
Hi @snifer,
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 / sum1
For more details, please check the pbix as attached.
Regards,
Frank
Hi @snifer,
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 / sum1
For more details, please check the pbix as attached.
Regards,
Frank
Hi @snifer ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank
Is there a relation between account codes, or you want to specifically calculate the values for 15999/58999, please elaborate
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)
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |