Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |