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, I'm fairly new to DAX. I'm trying to create this new measure comparing previous and old dates. DAX editor isn't pulling up the fields needed to compute though.
New_date_indicator = IF(Table1[Date1]=Table2[Date2], "0", "1")
Any explanation to why intellisense isn't pulling up these fields to calculate? Thank you.
This is what I'd like to create
Dummy data
Date1 | Date2 | Shop | New_date_indicator |
2/1/2019 | 2/1/2019 | TX | 0 |
3/4/2018 | 6/7/2020 | FL | 1 |
4/5/2020 | 4/5/2020 | CA | 0 |
3/2/2021 | 3/2/2021 | WA | 1 |
There is a lot to learn. Table1[Date1] (and 2) are columns. Because they are columns, they can have multiple values in those columns. It's like me saying "is this column of 10 values greater than this other column of 10 values". You can't do this, and hence Intellisense won't offer it as an option. To do the calculation, you must find a single value in the first column and compare it to a single value in the second column, like this.
New_date_indicator = IF(SELECTEDVALUE(Table1[Date1])=SELECTEDVALUE(Table2[Date2]), "0", "1")
@MattAllington Great! Thank you so much for your help. I believe that should work for me. The error that I recieve though is "there's not enough memory to complete this operation", when this should only calculate for about 12 rows. The selectedvalues on their own calculate just fine, it only throws an error when it is all pieced together in the IF statement. Any thoughts?
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 |
---|---|
49 | |
27 | |
20 | |
15 | |
12 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |