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 all,
first of all i'm a beginner at powerBI.
I've searched google and microsoft, but no answer yet.
So , I have a "startdate" and "enddate" and a "targetdate" of a service. Im looking for a way where it can be shown if the targetdate has been acquired or not.
Can anyone here help me?
Solved! Go to Solution.
Hi @fluffy2cake ,
You can try formula like below:
M =
VAR curStart =
MAX ( 'Table'[StartDate] )
VAR curEnd =
MAX ( 'Table'[EndDate] )
RETURN
IF (
MAX ( 'Table'[Target] ) > curStart
&& MAX ( 'Table'[Target] ) < curEnd,
"Achieved",
"Not Achieved"
)
You can also consider using conditional formatting for additional visual cues. For example, you could set the font color of the "background" visualization to green if the goal is not achieved, or red if it is.
If the above scenario does not meet your expectations, please refer to the following link to provide the relevant test data and screenshots of the expected results to facilitate me to answer your questions as soon as possible.
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @fluffy2cake ,
You can try formula like below:
M =
VAR curStart =
MAX ( 'Table'[StartDate] )
VAR curEnd =
MAX ( 'Table'[EndDate] )
RETURN
IF (
MAX ( 'Table'[Target] ) > curStart
&& MAX ( 'Table'[Target] ) < curEnd,
"Achieved",
"Not Achieved"
)
You can also consider using conditional formatting for additional visual cues. For example, you could set the font color of the "background" visualization to green if the goal is not achieved, or red if it is.
If the above scenario does not meet your expectations, please refer to the following link to provide the relevant test data and screenshots of the expected results to facilitate me to answer your questions as soon as possible.
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Adam,
my apologies for not responding sooner to your excellent suggestion. Life happened etc..
I hope you'd still be willing to help me solve this problem. Im partway there but the result is that all record are deemed "not acchieved" with this code. I can see in my source there are records that should result in "achieved".
I edited your code to match my tables as follows:
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
51 | |
50 | |
48 |