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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts in the Power BI community,
I need your help. I'm working on a power bi dashboard on the number of open positions based on a specific duration:
- 30 days and below
- 31 - 60 days
- 61 - 90 days
- 91 - 180 days
- 180 +
In which is similar to the one below. This date will be measured against the date of job search which is the data i already have. Could anyone have any advise on how can i achieve the below (photo) results? Thanks in advance.
Solved! Go to Solution.
Hi, @Anonymous ;
Try to change '2022 Recruitment'[Sourcing Starting Date] to MAX ( '2022 Recruitment'[Sourcing Starting Date] 😞
measure=
VAR _diff =
DATEDIFF ( MAX ( '2022 Recruitment'[Sourcing Starting Date] ), TODAY (), DAY )
RETURN
IF ( _diff < 30 && _diff >= 1, "1-30days", BLANK () )
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
Try to change '2022 Recruitment'[Sourcing Starting Date] to MAX ( '2022 Recruitment'[Sourcing Starting Date] 😞
measure=
VAR _diff =
DATEDIFF ( MAX ( '2022 Recruitment'[Sourcing Starting Date] ), TODAY (), DAY )
RETURN
IF ( _diff < 30 && _diff >= 1, "1-30days", BLANK () )
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Sorry,
I'm quite new to dex, i'm facing the error below. Am i doing it correctly?
You are not using the Datediff function correctly.
please refer from the below link.
https://learn.microsoft.com/en-us/dax/datediff-function-dax
Hi Thanks for the feedback, it's me again. Now i'm facing an error on the row of date mentioned contains too many value. Is there a way to resolve this?
Just create the Bins/Buckets by using Date Diff.
For example:
=IF([DateDiff]< 1, "0",
IF([DateDiff]>=1 && [DateDiff]<15,"1- 15 days",
IF([DateDiff]>=15 && [DateDiff]<30,"15-30 Days",
IF([DateDiff]>=30 && [DateDiff]<60,"30-60 Days",
IF([DateDiff]>=60 && [DateDiff]<90,"60-90",
BLANK())))))
Here the DateDiff will be replace by the Datediff function.
Please like the reply if you find it helpful.