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 am a beginner with Dax and I am trying to accept two columns ("Date" and "Reported Date") and each columns contains a date formatted date value.
I am looking to create a calculated column or measure to be used as a dynamic indicator when the dates are the same on the same row.
Example:
Date Reported Date New column
01/08/2018 02/08/2018 0
02/08/2018 02/08/2018 1
03/08/2018 02/08/2018 0
The idea is that if both dates are the same on the same row, the column should show 1 else 0. This way I am then able to filter on the 1 dynamically in the filters.
Many thanks for your replies.
Solved! Go to Solution.
Hello.
You could simply add new column then type this in the formula bar:
New Column = IF( TableName[Date] = TableName[Reported Date], 1, 0)
Hope this helps!
Hello.
You could simply add new column then type this in the formula bar:
New Column = IF( TableName[Date] = TableName[Reported Date], 1, 0)
Hope this helps!
Further to my other comments, given there are two tables, does it matter what table the column is created in?
Thanks for your reply.
I did do this but it the dates are in different tables and also when I go to enter one of the dates in the other table, the auto options when typing don't contain that field to select. I have setup the two tables with a relationship back to a dimdate table.
I've tried a lot of things but cannot get it working properly.
Oh! You forgot to mention that the dates are from two tables. You need to create a relationship between the two tables. It would be better if you could share your data or maybe a sample of your data in different tables.
Many thanks for your replies. I managed to sort it out myself in the end. 🙂
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |