The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I'm trying to find a way to utilize DAX to help us compare numerous project metrics against other projects with the same market sector categorization.
Example:
Projects will have many records of various metrics. One example might be Lead Times for any number of items. Project A is classified as "Residential". Project A's average lead time is 12.5 days. If Project A is selected, I have a card that displays average lead time for Project A, and would like to feature another card that shows the average lead time across all "Residential" projects. Intended outcome would be to allow a project to be benchmarked against similar historical projects on these metrics.
I've tried to achieve this using existing forum posts but seem to be leaving in the project filter in my calculation, as I get the same average in both cases (which is incorrect).
I currently have a project table that features a Project ID (Primary Key) as well as that projects classifier. Several other tables each with the actual data I am looking to calculate connect to the project table with the Project ID. I have a sample dataset I can provide but can't find a way to attach to this post.
My mind went to using a measure to accomplish this, but would it make more sense to create a calculated or custom column? Any pointers would be appreciated!
Solved! Go to Solution.
Hi,
In the Table visual, you will see 10.43 in the Grand total row
I was able to solve this and have it display on cards as intended with the following measures:
I was able to solve this and have it display on cards as intended with the following measures:
Hi Ashish,
I think your solution is similar but I am lookin to do a calculation of the values associated with all matching categories. I wasn't able to attach a .PBIX but here is a screenshot of the sample data and use case. Note the Site Average Cards are averaging only the selected site, in this case B.
I am not sure of how much i can help but i can try. Share the download link of the PBI file.
Hi Ashish, The desired outcome would be the average lead time for all items on sites A and B. Therefore, the final answer in this sample should be 10.4 for average lead time when either A or B are selected.
I'm thinking I will have to utilize either allexcept() or Allselected() to get around using the project filter. Will report back if I have any successful attempts.
Hi, @lukaszj97
Glad to help you, you can use Google Drive to share your pbix files (please set up no need to log in to a Google account to access).
Best Regards,
Yang
Community Support Team