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.
i have some list of opportunities which has Anticipated Win date, see below
i want to create a coloumn which subtracts (Anticipated date-Current date)[Note: current date dax should be used]
and gives me the counts of the date
after giving the count of the days
it should calcuate like below
if the count is <0, show that to me as "Lapsed"
If the Count is<=30, show that as "0-30" & for <=60, show that as 30-60,
Solved! Go to Solution.
Hi @vjnvinod ,
We can create two measures in this table visual to meet your requirement:
Date Counts =
DATEDIFF ( TODAY (), MIN ( 'Table'[AnticipatedWinDate] ), DAY )
Status =
IF (
[Date Counts] < 0,
"Lapsed",
IF (
[Date Counts] <= 30,
"0-30",
IF (
[Date Counts] <= 60,
"30-60",
IF ( [Date Counts] <= 90, "60-90", "More than 90" )
)
)
)
Best regards,
Hi @vjnvinod ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @vjnvinod ,
We can create two measures in this table visual to meet your requirement:
Date Counts =
DATEDIFF ( TODAY (), MIN ( 'Table'[AnticipatedWinDate] ), DAY )
Status =
IF (
[Date Counts] < 0,
"Lapsed",
IF (
[Date Counts] <= 30,
"0-30",
IF (
[Date Counts] <= 60,
"30-60",
IF ( [Date Counts] <= 90, "60-90", "More than 90" )
)
)
)
Best regards,
Hi @vjnvinod ,
I would probably tackle this in two steps, just because it'd be easier to debug:
1. Create a calculated column, which counts the days since start date, like:
DayCount = Dateiff([AnticipatedWinDate], Today(), Day)
2. Create a conditional column using the logic you mention below.
However, if you'd rather create a measure which calculates all of that at once, it would probably look something like this:
If(Dateiff([AnticipatedWinDate], Today(), Day) < 0, "Lapsed", if(Dateiff([AnticipatedWinDate], Today(), Day) <= 30, "0-30", if(Dateiff([AnticipatedWinDate], Today(), Day) <= 60, "30-60", if(Dateiff([AnticipatedWinDate], Today(), Day)<= 90, "60-90", (if(Dateiff([AnticipatedWinDate], Today(), Day) > 90,"More than 90", ""))))
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 |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |