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 September 15. Request your voucher.
Hello,
Looking to get days between dates, my current issues is that one date is a measure and the other is a column so struggling to find the correct way to do it. I have included a screen shot of my Report page so far,
so the Date_Selected card is a dax formuler
Date_Selected = CALCULATE(MAX('Transaction Line Item'[CreatedDate]),ALLSELECTED('Transaction Line Item'))
This returns the date selected in the slicer to the left of it.
I then want to add a column at the end of the table which figures out the age in days so the formular should be
Doc Age = Date_Selected - Document.c2g_DueDate__c
The issue I have is that this returns another date where I need it to return a number,
Any help is appriciated.
Thanks
Dobby_Libr3
Solved! Go to Solution.
Doc Age = DATEDIFF(Date_Selected, Document.c2g_DueDate__c, DAY)
Should be able to use:
Doc Age = ([Date_Selected] - MAX([Document.c2g_DueDate__c])) * 1.
This would be a measure. Since you refer to a column, you have to wrap it in an aggregation like MIN, MAX, SUM, etc.
Should be able to use:
Doc Age = ([Date_Selected] - MAX([Document.c2g_DueDate__c])) * 1.
This would be a measure. Since you refer to a column, you have to wrap it in an aggregation like MIN, MAX, SUM, etc.
Doc Age = DATEDIFF(Date_Selected, Document.c2g_DueDate__c, DAY)
Thanks @Anonymous you are a Ninja
Put a like "Kudos" on my reply, thanks!
User | Count |
---|---|
68 | |
63 | |
59 | |
55 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |