Skip to main content
General dataset discussion

Dataset: DD-HLT-001

DD-HLT-001

amnahafeez · 1 day ago

Replies

amnahafeez · 1 day ago
Reference Q# 28
What i am doing wrong here
set the admissiondateKey column as admission date and changed it type to date
then i added a column to fact table names "year" based on admission key
Then i calculated current year encounter volume using the following DaxCurrent Year Encounter Volume =
VAR Latestyear=
CALCULATE(
MAX(FactOutpatientVisits[Year]),
ALL(FactOutpatientVisits)
)

RETURN
CALCULATE(
[Total Encounter Volume],
FactOutpatientVisits[Year]=Latestyear
)

Next i calculate prior year Volume using following Dax
Prior Year Volume =
VAR Latestyear= CALCULATE(MAX(FactOutpatientVisits[Year]),FactOutpatientVisits)
RETURN
CALCULATE([Total Encounter Volume],
FactOutpatientVisits[Year]=Latestyear-1
)

and then calculated YOY Change using the dax

YOY Change = ABS([Current Year Encounter Volume]-[Prior Year Volume])

two department ID are matching but one is not matching. My result is Dep ID 3,10,9 having respective encounter YOY change being 56,52,44.

While Answer say it as 10,9,16

what i am doing wrong here
admin_findi360 · 1 day ago
Hi, great work, your model is right and you’re very close. The only issue is ABS() in YOY Change.

Department 3 actually fell: 330 encounters in 2024 to 274 in 2025, a change of −56. ABS turns that into +56, which pushes it to the top. The question asks which departments drove the growth, so rank by the signed change:

YOY Change = [Current Year Encounter Volume] - [Prior Year Volume]

Sort descending and you’ll get 10 (+52), 9 (+44), 16 (+39). Your 52 and 44 already match. And if you sum the change across all departments, you should get the net +266, which is the “reconcile to the hospital total” part.
amnahafeez · 1 day ago
Net change was matching

Sign in to reply to this thread

Reading is open to everyone. To reply, compare your result or post your approach you need a free findi360 account and a public username — your email is never shown.