Forum Discussion
Ashish9201
Helper I
2 years agoNeed 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...
Anonymous
2 years agoNot applicable
Hi Ashish9201
To correct the calculation of the number of items, you need to make sure that you are using the correct columns in the DISTINCTCOUNT function. It appears that the problem may be related to the way you are calculating the different item IDs.
Modify your fomula like below:
Average =
VAR TotalProjects =
DISTINCTCOUNT ( merged_allocation_daily[Project Sys ID] )
VAR TotalCrews =
DISTINCTCOUNT ( merged_allocation_daily[Crew Sys ID] )
RETURN
DIVIDE ( TotalProjects, TotalCrews, 0 )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.