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 All,
I am struggling to find a solution for the below scenario. As shown below I have the year, quarter and month columns and for each month I have (Low, Medium, High, Undetermined) indicators and the corresponding tasks. I would like to achieve the result of the 5th and 6th columns (I would like to create measures for this). For each year, I like to calculate the distinct number of months per year (which have tasks assigned). And the 6th column would be the total number of tasks for that year, And the last column will be the result of "Sum of tasks yearly/Desired Measure(For Months)"
Year | Quarter | Month | Indicator | Tasks | Desired Measure(For Months) | Sum of tasks yearly | Average |
2018 | Qtr 4 | October | Low | 1 | 2 | 3 | 1.5 |
2018 | Qtr 4 | October | High | 1 | 2 | 3 | 1.5 |
2018 | Qtr 4 | November | Low | 1 | 2 | 3 | 1.5 |
2019 | Qtr 1 | January | Low | 5 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | January | Medium | 1 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | January | High | 1 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | January | Undetermined | 2 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | February | Low | 2 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | February | Medium | 1 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | February | High | 2 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | March | Low | 5 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | March | Medium | 2 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | March | High | 6 | 3 | 28 | 9.333333 |
2019 | Qtr 1 | March | Undetermined | 1 | 3 | 28 | 9.333333 |
Any help much appreciated!
Thanks,
Sam
Solved! Go to Solution.
After going through other help topics, I was able to find the solution.
The below measure will provide the correct results. However, if we have any blank values in any of the columns this will formulae doesn't work and we need to add a filter condition in place 'ALL'.
After going through other help topics, I was able to find the solution.
The below measure will provide the correct results. However, if we have any blank values in any of the columns this will formulae doesn't work and we need to add a filter condition in place 'ALL'.
@sam021083 add following 3 measures
Distinct Month Count = DISTINCTCOUNT( Table[Month] ) Tasks = SUM( Table[Tasks] ) Avg = DIVIDE( [Tasks], [Distinct Month Count] )
Drop a table visual and Year, and 3 new measures on values.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |