Forum Discussion
Anonymous
4 years agoNot applicable
How to write this Logic in DAX
I'd like to know how to write this line bellow in DAX. I'm a beginner and I'm having a lot of problems trying to write this code in Dax to return the value I need. (select top 1 Payor.CompanyNam...
- Anonymous4 years ago
HI Anonymous,
You can try to use the following measure formula if helps:
formula = VAR currpayorSer = SELECTEDVALUE ( PatientPayor[PayorSer] ) VAR currPatientSer = SELECTEDVALUE ( PatientPayor[PatientSer] ) RETURN CALCULATE ( MIN ( Payor[CompanyName] ), FILTER ( ALLSELECTED ( Payor ), Payor[PayorSer] = currpayorSer ), FILTER ( ALLSELECTED ( Patient ), Patient[PatientSer] = currPatientSer ) )If the above also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Anonymous
4 years agoNot applicable
HI Anonymous,
You can try to use the following measure formula if helps:
formula =
VAR currpayorSer =
SELECTEDVALUE ( PatientPayor[PayorSer] )
VAR currPatientSer =
SELECTEDVALUE ( PatientPayor[PatientSer] )
RETURN
CALCULATE (
MIN ( Payor[CompanyName] ),
FILTER ( ALLSELECTED ( Payor ), Payor[PayorSer] = currpayorSer ),
FILTER ( ALLSELECTED ( Patient ), Patient[PatientSer] = currPatientSer )
)
If the above also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Anonymous
4 years agoNot applicable
Thank you all. This one did the trick! 🙂