Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi dear community.
I've been trying for hours, but I cannot seem to get the right results. I've had different results but my last attempt is in the screenshot.
What i need to do is calculate a percentage based on hours.
SICK HOURS / TOTAL HOURS * 100
The expected results are in the notepad below.
I cannot attach the report because of privacy unfortunately.
Column Tijdsregistraties["Dagen"] is a custom column with the following: Dagen = Tijdsregistraties[duur] / 60 / 60 / 1000 / 8
The sick hours is based on a column ProductRegistratie which contains the text "Ziek" it uses the same Dagen column but with this filter on it.
My attempt is:
DagenZiektePercentagee =
var ziektedagen = CALCULATE(SUM(Tijdsregistraties[Dagen]);Tijdsregistraties[ProductRegistratie] = "Ziek")
var dagentotaal = SUM(Tijdsregistraties[Dagen])
return
ziektedagen / dagentotaal
Solved! Go to Solution.
Well maybe im stupid or need to learn more about PowerBI.
Using a column with this DAX command was giving strange results.
After using a measure, it works perfectly...
Why does this matter so much...?
Anyway : this worked as a charm in a measure:
Dagentest = SUM(Tijdsregistraties[Dagen Ziek]) / SUM(Tijdsregistraties[Dagen Gewerkt]) * 100
Can you just click the little drop down arrow in the Fields area for your column and click Show as | Percent of Total?
Hi
Thanks for the suggestion, i tried that and that does not give me the expected results. The results should be seperately calculated from eachother per individual exactly like i showed in the notepad.
I need to calculate per individual:
DIVIDE: SICK DAYS BY TOTAL WORK DAYS TIMES 100
Well maybe im stupid or need to learn more about PowerBI.
Using a column with this DAX command was giving strange results.
After using a measure, it works perfectly...
Why does this matter so much...?
Anyway : this worked as a charm in a measure:
Dagentest = SUM(Tijdsregistraties[Dagen Ziek]) / SUM(Tijdsregistraties[Dagen Gewerkt]) * 100