The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I wanted to create a new column in my PowerBI Dashboard report that compares two date columns (<, >, >=, <=). I need the output for this new date column to either be a date or some sort of binary output (true/fasle, 1 or 0). How can I do this in a PowerBI?
Do you have a copy of the PBIX file i could look at?
Okay without seeing the data it might be more difficult, from the look of it each record in the aprroval table links to many in the security. which date are you trying to compare against?
if it's the most recent, try wrapping the knowledge date part in a MAX function.
@DOLEARY85 Does it matter which table I create the calculated column on? See attached. There can be many different knowledge dates but the approval date is only the most recent shown in that column. Both Approval and Security tables are connected on the Security ID
It should work if you put it in the security table, i took a sample of the data and ran a test:
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Even in this example the knowledge date is prior to the approval date but yet the formula you wrote is returning a 1
IT WORKED! Thank you
@DOLEARY85 Never mind. I am still getting values that are returning true even though the knowledge date of that row is less than the MAX(Approval Date). This is the formula I inputed:
Check the dates are the same format in both tables
What format should they be in? Date, true/false, text?
No Problem, happy to help 🙂
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
To reiterate, there is only one Approval Date per Security ID but there can be multiple Knowledge Dates per Security ID
Hi,
you can create a calculated column:
e.g. for if one is equal to the other:
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍