Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
How do i convert the following SQL to Dax?
select COUNT(*) from TDRep TDR , TDPSLink TDPSL where TDR.TDId = TDPSL.TDID AND TDR.ToStatus = '7' AND (TDPSL.StatusId != 12 OR TDPSL.StatusId != 10)
Thank you
Solved! Go to Solution.
Hi @pityman ,
Refer this measure.
Measure = CALCULATE(COUNT(TDRep[TDId]),FILTER(TDRep,TDRep[TDId] in VALUES(TDPSL[TDId])&&TDRep[ToStatus ]=7),FILTER(TDPSL,TDPSL[StatusId]<>12||TDPSL[StatusId]<>10))
Best Regards,
Jay
Hi @pityman ,
Refer this measure.
Measure = CALCULATE(COUNT(TDRep[TDId]),FILTER(TDRep,TDRep[TDId] in VALUES(TDPSL[TDId])&&TDRep[ToStatus ]=7),FILTER(TDPSL,TDPSL[StatusId]<>12||TDPSL[StatusId]<>10))
Best Regards,
Jay
@pityman , Both tbale should have join in power bi on TDID, create a measure like
calculate(countrows(TDRep), filter(TDRep, TDRep[ToStatus] ="7"), filter(TDPSLink,TDPSLink[StatusId] <> 12 || TDPSLink[StatusId]<> 10))
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
114 | |
99 | |
97 | |
65 | |
59 |