March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone!
Could you please help with following question.
I have a data of the projects with their projected Revenue and expenses.
Revenue is divided by hard (100% we will get this payment) and soft (questionable) parts.
Also, there is a 4 scenario for revenue, like 1st - we won't have a soft part of Revenue, 2nd - 50%, 3rd - 100%, 4th - 120%.
Same situation with an expenses. Some parts will be as it planned, but some parts will be affected by indextation.
Percentage of hard and soft parts also is questionable (it could be 50%-50%, or 60-40%, or 70%-30%)
Again, there is a few situation, like indexation for 5%, 10% and 15%.
And all this scenarios are not intercept each other.
The Idea is a create a table where We could see how the amount and the quantity of projects with loss.
To take a Percentage as a slicer, column as a scenarion of Revenue and Lines as a scenario of Costs.
My working table look like a following one:
Projects | Revenue | Cost |
A | 976 | 850 |
B | 926 | 819 |
C | 936 | 808 |
D | 954 | 766 |
I tried to create a table, but here I've been told that it is not possible to create a table wich relies on variable.
I have made a measure to calculate the Profit, but I need help with counting a Projects with negative profit.
Could you please give me any Ideas how I could do it?
Solved! Go to Solution.
Hi @Aidarbek ,
It seems like you're working on a complex scenario analysis in Power BI where you want to calculate the number of projects with negative profit under various scenarios. Here's how you can approach this problem effectively:
Create Measures for Revenue and Costs:
Revenue_Scenario = SWITCH( SELECTEDVALUE(RevenueScenario[Scenario]), "1", SUM(Projects[HardRevenue]), "2", SUM(Projects[HardRevenue]) + 0.5 * SUM(Projects[SoftRevenue]), "3", SUM(Projects[HardRevenue]) + SUM(Projects[SoftRevenue]), "4", SUM(Projects[HardRevenue]) + 1.2 * SUM(Projects[SoftRevenue]) )
Calculate Profit Measure: Use the revenue and cost measures to calculate profit:
Profit = [Revenue_Scenario] - [Cost_Scenario]
Count Projects with Negative Profit: Create another measure to count projects where profit is negative:
Negative_Profit_Projects = COUNTROWS( FILTER( Projects, [Profit] < 0 ) )
Create Scenario Tables:
Example for Revenue Scenarios Table:
Scenario 1 2 3 4
Set Up the Matrix:
Enable Interactivity with Slicers:
Please mark this as solution if it helps you. Appreciate Kudos.
Hi @Aidarbek
Technically speaking you can use varibles in a calculated table but these variables will not respond to slicer selections and so is your calculated table as it is updates only upon creation or the underlying/referenced data has been changed such as upon refresh. That aside, can you please post your expected result and not just describe it.? Given your current sample data, what information in a table do you expect if from those different scenarios? A link to an excel file with all the formula/calculations will be very helpful.
Proud to be a Super User!
Hi @Aidarbek ,
It seems like you're working on a complex scenario analysis in Power BI where you want to calculate the number of projects with negative profit under various scenarios. Here's how you can approach this problem effectively:
Create Measures for Revenue and Costs:
Revenue_Scenario = SWITCH( SELECTEDVALUE(RevenueScenario[Scenario]), "1", SUM(Projects[HardRevenue]), "2", SUM(Projects[HardRevenue]) + 0.5 * SUM(Projects[SoftRevenue]), "3", SUM(Projects[HardRevenue]) + SUM(Projects[SoftRevenue]), "4", SUM(Projects[HardRevenue]) + 1.2 * SUM(Projects[SoftRevenue]) )
Calculate Profit Measure: Use the revenue and cost measures to calculate profit:
Profit = [Revenue_Scenario] - [Cost_Scenario]
Count Projects with Negative Profit: Create another measure to count projects where profit is negative:
Negative_Profit_Projects = COUNTROWS( FILTER( Projects, [Profit] < 0 ) )
Create Scenario Tables:
Example for Revenue Scenarios Table:
Scenario 1 2 3 4
Set Up the Matrix:
Enable Interactivity with Slicers:
Please mark this as solution if it helps you. Appreciate Kudos.
Thank you!
I used Distinctcount which didn't work, but your Idea to use countrows worked perfrectly.
Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
122 | |
73 | |
59 | |
57 | |
44 |
User | Count |
---|---|
177 | |
120 | |
83 | |
66 | |
57 |