Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello everyone,
PBIX file : https://1drv.ms/u/s!Ag9tIyk2ofNRjlBFygNBL3s9VG2N?e=qoIeBc
Excel file: https://1drv.ms/x/s!Ag9tIyk2ofNRjk9-uND6F2ZLZgaZ?e=oAWQzt
I have revenue table which includes service name and all, and expense table which include service expense
to calculate percentage, i need to do servicerevnue / total_revenue
then service expense is calculated_percentage * total-service_expense
when i select for example october 4:
and when i select october 5:
and when i select both:
as you see, lets take service A:
on october 4, expense is 163.58 and gross is 1,041.42
on october 5, expense is 32.63 and gross is 376.47
so if i select october 4 and october 5 together:
i should get for expense = 196.21 and gross = 1417.99
but as photo above states, i got the numbers wrong
please help
Solved! Go to Solution.
@Anonymous
I provided my explanation in my first reply. Attached the solution for the example yoy have provided in this post.
@tamerj1 why is it when i do the calculations seperatly it works but when i make them into one measure and use Var it doesnt give the same answer?
@Anonymous
Please provide more context. Please provide one example.
@tamerj1 thank you very much i appreciate your help
for somereason it works on the sample data but i did the same exact calculation and method on my work project but doesnt work for some reason
@Anonymous
Perhaps it has a different filter context. Maybe you can share more details to assist you further.
Thank you veey much but this is another post for taxes and this one is for the expense can you please help out
@Anonymous
Sure. However, it is the same approach; you need to iterate over the the selected dates one by one, perform the calculation for each date then sum the individual results for all the selected dates.
what is the formula for Expanses?
@tamerj1 it is included in the powerbi file but this is the formula
ServicerevenueA = CALCULATE(SUM(revenue_table[total]),revenu_table[service]= "Service A")
Total revenue = SUM(revenue_table[total])
PercentageA = [servicerevenueA]/[total revenue]
Service expense = CALCULATE(SUM(expense_table[total]),expense_table[eligible for service revenue] = "true")
ExpenseA = [PercentageA] * [serviceexpense]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |