Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with all measurements of all people. Its based out of Company names and normal names. In the first function I want to get a list of alle people from a selected company with the lowest apointmentNumber.
This list is calculated with the folowing function:
FirstValue =
VAR selectie =
SELECTEDVALUE ( company[Name] )
VAR EersteWaarde =
CALCULATE (
MIN ( usermeasurements[AppointmentId] ),
FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] ),
FILTER ( usermeasurements, usermeasurements[users.company.Name] = selectie )
)
RETURN
EersteWaarde
In this part I want to select all first values from the selected Company. This part is only working when I connect this function with a name list of the company. I want to use all first values in the folowing function to calculate some output:
GemiddeldeLichaamssamenstellingEerste =
VAR selectie =
ADDCOLUMNS (
VALUES ( company[Name] ),
"EersteWaarde",
CALCULATE (
MIN ( usermeasurements[AppointmentId] ),
FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] )
)
)
VAR LS =
CALCULATE (
AVERAGE ( usermeasurements[BodyCompositionOverall] ),
TREATAS (
selectie,
usermeasurements[users.company.Name],
usermeasurements[appointments.AppointmentNumber]
)
)
RETURN
COALESCE ( LS / 10, 0 )
So i want the table as mentioned earlier as input to calculate some averages of that selection (so the given apointmentID's)
This is the result I want. So some selected names and FirstValues. From those Values I need to calculate some averages.
How can I deal with this?
Hi @DionTN
I'm not able to follow this. Would you mind if you rephrased the question, please? It would also be nice if you could format the code properly (www.daxformatter.com) before pasting. It's almost impossible to read this as it is right now. If you could paste some pictures of what it is you want, that would also help.
Thanks.
I changed my question. Hopefully you can help me.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |