Forum Discussion
Ashish9201
2 years agoHelper I
Need help in DAX formula
Hi, I have created a average function which is as below "Average = (DISTINCTCOUNT(merged_allocation_daily[Project Sys ID])/(DISTINCTCOUNT(merged_allocation_daily[Crew Sys ID])))" However the c...
AnalyticsWizard
2 years agoSolution Supplier
Hi Ashish9201
Here’s how you can achieve this:
Create a New Measure:
- Go to the Modeling tab in Power BI.
- Click on New Measure.
- Name your measure (e.g., “Crew with 5+ Projects”).
Calculate Crews with 5 or More Projects:
- Use the following DAX formula for your new measure:
Crew with 5+ Projects = CALCULATE( [Distinct Crew Count], FILTER( ALL(merged_allocation_daily), [Distinct Crew Count] >= 5 ) ) - Replace [Distinct Crew Count] with your existing measure for distinct crew count (e.g., DISTINCTCOUNT(merged_allocation_daily[Crew Sys ID])).
- Use the following DAX formula for your new measure:
Update Your Visual:
- Now, use the new measure “Crew with 5+ Projects” in your visual instead of the previous “# of Projects” measure.
- Apply any necessary filters to your visual.