Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Please Help.
I started using power BI recently and I need help.
i Need to get the ammount of days Left Before our service Expires to put it on a Table. (in Days)
I hace the dates when the client Purchases the service and the Expiration Date of the service, but i need to get the amount of days left before it expires.
Please Help
Thks
Solved! Go to Solution.
Assuming your table looks something like this:
Then this measure should work. If you want to show the days since expiration, just get rid of the switch statement.
# Days Until Expiration =
VAR TodayDate = UTCTODAY() - 6/24 // 6 indicates the number of hours from UTC (Central Time)
VAR ExpDate = MAX(ExpirationDates[ExpirationDate])
RETURN
SWITCH(
TRUE(),
DATEDIFF(TodayDate, ExpDate, DAY) < 0, 0,
DATEDIFF(TodayDate, ExpDate, DAY)
)
Please accept this a solution if this solves your problem.
Assuming your table looks something like this:
Then this measure should work. If you want to show the days since expiration, just get rid of the switch statement.
# Days Until Expiration =
VAR TodayDate = UTCTODAY() - 6/24 // 6 indicates the number of hours from UTC (Central Time)
VAR ExpDate = MAX(ExpirationDates[ExpirationDate])
RETURN
SWITCH(
TRUE(),
DATEDIFF(TodayDate, ExpDate, DAY) < 0, 0,
DATEDIFF(TodayDate, ExpDate, DAY)
)
Please accept this a solution if this solves your problem.
Thank you so much!
You did it.
eres lo maximo bro!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |