Forum Discussion
TSK
6 years agoFrequent Visitor
DAX for Measure
I need help in creating measure, I have 3 tables 1) Patient Name 2) Patient Diagnosis 3) Medicene Consumed. I have linked diagnosis and medicene table with Patient Name table via ID. Now I want a mea...
- 6 years ago
Hi , TSK
You may check if the following measure helps.
Measure 1 = VAR tab = SUMMARIZE ( 'Patient Name', 'Patient Name'[ID], 'Patient Name'[Name], "flag", VAR _id = [ID] RETURN IF ( LOOKUPVALUE ( 'Patient Diagnosis'[Diagnosis], 'Patient Diagnosis'[ID], _id ) = "Fever" && "Arinac" IN DISTINCT ( 'Medicene Consumed'[Medicine Name] ) && "Panadol" IN DISTINCT ( 'Medicene Consumed'[Medicine Name] ), 1, 0 ) ) RETURN SUMX ( tab, [flag] )Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-easonf-msft
6 years agoCommunity Support
Hi , TSK
You may check if the following measure helps.
Measure 1 =
VAR tab =
SUMMARIZE (
'Patient Name',
'Patient Name'[ID],
'Patient Name'[Name],
"flag",
VAR _id = [ID]
RETURN
IF (
LOOKUPVALUE ( 'Patient Diagnosis'[Diagnosis], 'Patient Diagnosis'[ID], _id ) = "Fever"
&& "Arinac" IN DISTINCT ( 'Medicene Consumed'[Medicine Name] )
&& "Panadol" IN DISTINCT ( 'Medicene Consumed'[Medicine Name] ),
1,
0
)
)
RETURN
SUMX ( tab, [flag] )
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TSK
6 years agoFrequent Visitor
Want to ask one more thing, if I have lots of kind of fever like, fever dengue, fever malaria, fever covid, in that case how can I catch any diagnosis which contains the word fever rather than hard coded "Fever"