Forum Discussion
Sumar categorias
- 6 years ago
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Create a measure to calculate each Account and Branch’s profit rate:
Profit Rate =
DIVIDE (
CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Sales" )
)
- CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Cost of Sales" )
)
- CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Staff Expenses" )
),
CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Sales" )
)
)
2)Create a measure to check Loss or Profit:
Loss/Profit Status = IF(Profit[Profit rate]<0,"Loss","Profit")
3)The result shows:
Here is my test pbix file:
By the way, please post a reply in English so we can understand the issue better.
Best Regards,
Giotto Zhi
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Create a measure to calculate each Account and Branch’s profit rate:
Profit Rate =
DIVIDE (
CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Sales" )
)
- CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Cost of Sales" )
)
- CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Staff Expenses" )
),
CALCULATE (
MAX ( 'Profit'[Money] ),
FILTER ( 'Profit', 'Profit'[Gral.Account] = "Sales" )
)
)
2)Create a measure to check Loss or Profit:
Loss/Profit Status = IF(Profit[Profit rate]<0,"Loss","Profit")
3)The result shows:
Here is my test pbix file:
By the way, please post a reply in English so we can understand the issue better.
Best Regards,
Giotto Zhi