Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a single column of Date, where each row is a query performed by a patient at the psychologist. I need the sum of days from the first consultation to the last one per patient and professional.
Columns:
fBase[Patient]
fBase[Professional]
fBase[Date]
Solved! Go to Solution.
Hi @Vialle_Diego
Please try
Num Dias =
SUMX (
SUMMARIZE ( fBase, fBase[Proffissional], fBase[Paciente] ),
CALCULATE (
VAR MinDate =
MIN ( fBase[Data] )
VAR MaxDate =
MAX ( fBase[Data] )
RETURN
DATEDIFF ( MinDate, MaxDate, DAY )
)
)
Hi @Vialle_Diego
Please try
Num Dias =
SUMX (
SUMMARIZE ( fBase, fBase[Proffissional], fBase[Paciente] ),
CALCULATE (
VAR MinDate =
MIN ( fBase[Data] )
VAR MaxDate =
MAX ( fBase[Data] )
RETURN
DATEDIFF ( MinDate, MaxDate, DAY )
)
)
User | Count |
---|---|
70 | |
43 | |
21 | |
21 | |
14 |
User | Count |
---|---|
124 | |
42 | |
39 | |
28 | |
25 |