March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I need a new column or measure to show how many days till the "Next Appt Due". My data has a lot of PPI so I'm providing an example. Table name is V_TR_Dental_Medical. I need to show how many days till the Next App Due for every client.
D_STF_PERS_NME | CL_ID | FRST_NME | LST_NME | APP_DT | APP_STATUS | APP_TYP | Appt_sub_type | INITIAL_MEDICAL_DUE | TIMELY_VISIT | NEXT_APPT_DUE_DATE |
Name | 1234 | Name | Name | 1/23/2023 | held | med_follow | ongoing | 1/26/2022 | y | 1/23/2014 |
Solved! Go to Solution.
@inglexjc ,
Just change the sequence of TODAY() and [NEXT_APPT_DUE_DATE].
So your new calculated would be below:
Days till next appt due = DATEDIFF(TODAY(), [NEXT_APPT_DUE_DATE], DAY)
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
@inglexjc ,
You can directly conditionally format in the visualization.
Just in case you want a calculated column with negative numbers shown in red, here it is:
Color = IF([Days till next appt due] < 0, "#FF0000","#000000")
You will need to conditionally format using this field.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
@anadad24 next part of this is I want to have the negative numbers (late date) to show in red. I'm trying to create a measure to show a status of LATE. Then I can create the conditional formating. Can you see what I'm doing wrong with my code?
Status =
VAR TodayDate = TODAY()
VAR NEXT_APPT_DUE_DATE = 'V_TR_Dental_Medical'[NEXT_APPT_DUE_DATE]
VAR Days till next appt due = TodayDate - NEXT_APPT_DUE_DATE
RETURN
IF(
Days till next appt due >= -1,
"Late")
@inglexjc ,
You can directly conditionally format in the visualization.
Just in case you want a calculated column with negative numbers shown in red, here it is:
Color = IF([Days till next appt due] < 0, "#FF0000","#000000")
You will need to conditionally format using this field.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
That did it. Thank you!
@inglexjc ,
Just change the sequence of TODAY() and [NEXT_APPT_DUE_DATE].
So your new calculated would be below:
Days till next appt due = DATEDIFF(TODAY(), [NEXT_APPT_DUE_DATE], DAY)
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
wrap the measure in an ABS() function
@amitchandak No one has responded to my question. You are showing up as a top solution expert. Would you happen to know?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |