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 trying to display the Vendor that is about to expire 6 months from today.
For example,
Start Date | End Date | Date of Renewal |
Jan. 1, 2021 | Dec. 30, 2021 | July 1, 2021 |
I want to show from another table the Date of Renewal. I do have the formula from excel ( =EDATE(E3,-6) ) but I don't know how to convert it into a DAX expression. I've created one but it's not working.
Please I need your help. Thank you.
Solved! Go to Solution.
Hi @Anonymous
Based on the data in your PBIX you have Service Providers that have already expired and some that are expiring in the next 6 months.
Using this measure you can see from a table the status of each vendor
Renewal =
VAR _DateDiff = DATEDIFF(TODAY(), SELECTEDVALUE('Vendor Data'[END]), MONTH)
RETURN
SWITCH(
TRUE(),
_DateDiff < 0 , "Expired",
_DateDiff < 6 , "Expiring",
"OK"
)
Proud to be a Super User!
Hi @Anonymous
Based on the data in your PBIX you have Service Providers that have already expired and some that are expiring in the next 6 months.
Using this measure you can see from a table the status of each vendor
Renewal =
VAR _DateDiff = DATEDIFF(TODAY(), SELECTEDVALUE('Vendor Data'[END]), MONTH)
RETURN
SWITCH(
TRUE(),
_DateDiff < 0 , "Expired",
_DateDiff < 6 , "Expiring",
"OK"
)
Proud to be a Super User!
Thank you @PhilipTreacy , your measure helped a lot. I'll use and study it. Again thank you so much.
@Anonymous
OK so are you trying to highlght every vendor that will expire within 6 months?
Regards
Phil
Proud to be a Super User!
Yes, that's right. I am trying to return all vendors who are expiring.
Thank you.
Hi @Anonymous
The 'Vendor Data'[END] column needs to be type Date.
You can see in your screenshot that it isn't.
Regards
Phil
Proud to be a Super User!
@Anonymous ,
From you screen shot, Vendor Date column should be of Date format. Try to make this column to Date Type like below Screen shot:
Select the Vendor Date then do the below formatting.
Hello @Tahreem24 ,
Thank you so much for this, I did what you told me to convert the text into a Date data type but unfortunately it returns the same error.
Hi @Anonymous
You haven't set your start date and end date columns to data type Date.
In Data view select the column(s) then change the Data type from the Ribbon
Are you trying to return just a single vendor or all vendors who are expiring?
Can you please share your PBIX file, or at least copy/paste some sampledata, so I understand the structure of your data.
Regards
Phil
Proud to be a Super User!
Hello @PhilipTreacy ,
Thank you so much for this, I did convert it into a Date data type but it still has the same error.
Here's the pbix file
https://drive.google.com/file/d/10ZzzViZY3txGd1cqj1YOo2uVTxq3k6Bb/view?usp=drivesdk
im sorry i dont know how to attached a pbix file here directly
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |