Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I am working with one excel workbook that has one sheet. There are clients and personnel who work on multiple clients. In power BI, I have a table showing: the personnel, the total number of hours each work, the total number of each clients they worked on, and the average number of hours per client.
The total number of each clients was calculated by dragging the Client name on to the value section of the visualization, and selecting count of client name from the drop down. Afterwards I was able to calculate the average per client using this formula:
Average Per client =
Solved! Go to Solution.
@parry2k I manage to get the correct average per client to calculate and the correct totals in each column. The thing is I don't understand how or why this works. In addition, can you please elaborate more on your first post as to why the average don't simply work?
This was the formula I ended up using:
@zrnooredeen hope this will help you to understand why you are not getting correct result. I created a sample dataset to explain, in image below, left hand side shows how your measures are working, and right hand side shows how it suppose to be. Look at Total line under Distinct Client measure
So right hand side, distinct count for client for each person is correct and that's why Avg works fine but at the total level, it give you distinct count of all the clients for all the persons and that is not sum of distinct client by each person, it is for whole dataset, and that;s why your avg at total line is not correct
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.
@parry2k How would I fix the average column so that it totals correctly in that case?
@zrnooredeen sorry I missed to post the DAX measure expression. here it is
Distinct Client (Revised) =
SUMX ( VALUES ( 'Table'[Person] ),
CALCULATE ( DISTINCTCOUNT ( 'Table'[Client] ) )
)
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.
@parry2k I manage to get the correct average per client to calculate and the correct totals in each column. The thing is I don't understand how or why this works. In addition, can you please elaborate more on your first post as to why the average don't simply work?
This was the formula I ended up using:
hi @zrnooredeen