Forum Discussion
help with measure
- 5 years ago
@hansaraneda You can add ALL() if you want it to be calculated on all data/rows.
previous balance amount 2 - DIVIDE(CALCULATE(SUM(Query1[saldo_anterior])),(CALCULATE(SUM(Query1[saldo_anterior]),Consultation1[Label]-"Entry of Ordinary Activities", ALL())),0)
thanks for your help but the problem has nothing to do with the dates. The issue is to calculate how much is the percentage of another line compared to the line of "income ordinary amounts". I attach an example in excel.
other income is 50.8% of other ordinary income
other expenses is 79.7 of other ordinary income
locomotion expenses is 79.7% of other ordinary income
Okay so you have:
Revenue of Ordinary Activities = CALCULATE(SUM(Query1[saldo_anterior]),Consultation1[Label]- "Entry of Ordinary Activities")
Then you need to calculate: Other Income, Other Expenses and Locomotion Expenses.
What column(s) in your data tell us how to find those values? For example:
Other Income = CALCULATE(SUM(Query1[saldo_anterior]),Consultation1[Label]- "Other Income")
Then the Percent is just a DIVIDE function.
See also if this helps, seems like you're trying to do something similar to a P&L statement? https://blog.enterprisedna.co/how-to-create-profit-and-loss-statements-in-power-bi/