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 September 15. Request your voucher.
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))