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.
Hello guys!
I want to convert the condition below SQL, to DAX. achieve success using measurement with earlier, but I get slow.
WHERE
tab1.cod =2
AND tab1.DATE >='20160101'
AND tab1.DATE <='20190901'
AND tab1.DATEBASE <='20170831'
AND (tab1.DATEBASE1 IS NULL OR tab1.DATEBASE1 >'20170831')
Thank you
Hi @Anonymous,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale
Hi @Anonymous
Are your data time columns DATE or NUMBER?
Something along these lines might work
Table 2 = FILTER('Tab1' , AND ( AND ( AND ( 'Tab1'[Date] >= DATE(2016,1,1), 'Tab1'[Date] <= DATE(2019,9,1) ) ,Tab1[DATEBASE] <= DATE(2017,8,31) ), OR(Tab1[DATEBASE1] = BLANK(),Tab1[DATEBASE1] > DATE(2017,8,31)) ) )
thanks, @Phil_Seamark
my data time columns this DATE.
Returned no value the example, I liked your example.
I will work a little more in it, I try to return success.
thank you again.
Here is a slightly different syntax
Table = FILTER('Tab1' , 1 = SWITCH(TRUE() , Tab1[COD] = 2 && Tab1[Date] >= DATE(2016,1,1) && Tab1[Date] <= DATE(2019,1,1) && Tab1[DATEBASE] <= DATE(2017,8,31) && ( Tab1[DATEBASE1] = BLANK() -- OR -- || Tab1[DATEBASE1] > DATE(2017,8,31) ), -- THEN -- 1 , -- ELSE -- 0 ) )
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |