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.
hi I have no idea how to solve this please help!!
so I have data (which in its simplified form is) Geography, Revenue, Profit and Profit%. There are 5 geographies and values in other three variables are for 10 Years from 2010 to 2019.
I want to create 3 matrices or tables. First is the period under analysis, second is the period being compared and third is the delta between two periods.
The first two tables are easy I just use slicer on tables; one can select the period for analysis and comparison - easy. The problem is to calculate the third table with deltas of revenue, profit and profit% from first two tables (which themselves are variable and depend on slicer).
Is there any solution that exists??? Highly appreciate any help!!!
Solved! Go to Solution.
Here is one way to solve this one:
1. Make two disconnected tables with the Year values using -
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@hyousuf9090 , you should be able to analyze data across a common dimension and should able to take diff also.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
hi, thanks for helping.
The sample data is:
Year | Geography | Revenue | Profit |
2010 | North America | 100 | 70 |
2010 | Latin America | 80 | 60 |
2010 | Asia | 50 | 30 |
2010 | Europe | 30 | 15 |
2010 | Africa | 20 | 7 |
2011 | North America | 120 | 95 |
2011 | Latin America | 150 | 100 |
2011 | Asia | 180 | 120 |
2011 | Europe | 50 | 30 |
2011 | Africa | 30 | 15 |
2012 | North America | 135 | 80 |
2012 | Latin America | 120 | 85 |
2012 | Asia | 80 | 50 |
2012 | Europe | 40 | 25 |
2012 | Africa | 30 | 20 |
2013 | North America | 125 | 100 |
2013 | Latin America | 100 | 75 |
2013 | Asia | 95 | 90 |
2013 | Europe | 85 | 50 |
2013 | Africa | 50 | 30 |
The two custom tables are:
using filter on year: 2010
Geography | Revenue | Profit | Profit% |
Africa | 20 | 7 | 35% |
Asia | 50 | 30 | 60% |
Europe | 30 | 15 | 50% |
Latin America | 80 | 60 | 75% |
North America | 100 | 70 | 70% |
Total | 280 | 182 | 65% |
using filter on year: 2012
Geography | Revenue | Profit | Profit% |
Africa | 30 | 20 | 67% |
Asia | 80 | 50 | 63% |
Europe | 40 | 25 | 63% |
Latin America | 120 | 85 | 71% |
North America | 135 | 80 | 59% |
Total | 405 | 260 | 64% |
needed: a table of delta of values from the above two tables that updates the values as filters are changed in above two tables.
thanks!
Here is one way to solve this one:
1. Make two disconnected tables with the Year values using -
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
hi thanks, what about profit% delta?
Hi @hyousuf9090 ,
Just add two more measure based on @hyousuf9090 's reply:
profit%1 = CALCULATE(SUM(Geography[Profit])/SUM(Geography[Revenue]),KEEPFILTERS(TREATAS(VALUES(Table1[Year]),Geography[Year])))
profit%2 = CALCULATE(SUM(Geography[Profit])/SUM(Geography[Revenue]),KEEPFILTERS(TREATAS(VALUES(Table2[Year]),Geography[Year])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @hyousuf9090 ,
You need to create three line and clustered column charts for each deltas of revenue, profit and profit% . Use the line to show the difference between two variables .Really can't use table or matrix to show the difference between two variables.
You should rank the table by Geography or group them by Geography then add index column for it and expand it.
Then you can use the following measure to show the deltas of revenue, profit and profit% :
Measure = ABS((SUMX(FILTER(Table,Table[rank] = MIN(Table[rank])),Table[Revenue])-SUMX(FILTER(Table,Table[rank] = MAX(Table[rank])),Table[Revenue])))
You can refer to the similar post: https://community.powerbi.com/t5/Desktop/Dynamically-calculate-differences-based-on-slicer-slection/...
Best Regards,
Dedmon Dai
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 |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
116 | |
106 | |
94 | |
79 | |
72 |