Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I'm new with Power BI and queries. The situation is as folllowed:
I'm using the following measurement to calculate the cost per hire over a year.
CPH = SUM(Recruitmentchannel[cost])/Countrows(NewEmployees)
That works great, but if a click a month in the visualization. The calculation is wrong. So when i select a month i want the measurement to be like this:
CPH = SUM(Recruitmentchannel[cost])/12/Countrows(NewEmployees)
Does anyone know how to fix this problem? It would be much appreciated, cause it's for my final paper.
Cheers,
Kjell
Solved! Go to Solution.
CPH = IF(HASONEVALUE('Table'[Month]),SUM(Recruitmentchannel[cost])/12/Countrows(NewEmployees),SUM(Recruitmentchannel[cost])/Countrows(NewEmployees))
CPH = IF(HASONEVALUE('Table'[Month]),SUM(Recruitmentchannel[cost])/12/Countrows(NewEmployees),SUM(Recruitmentchannel[cost])/Countrows(NewEmployees))