frankee_gee
Board Regular
- Joined
- Mar 3, 2008
- Messages
- 144
- Office Version
- 365
- 2016
- Platform
- Windows
Hello Everyone,
Needed help with editing or creating measures/calculated fields. Find expected results @ the following link: https://dl.dropboxusercontent.com/u/68876442/AgingMeasureHelpb.xlsx
After researching a many forums I was able to create the initial measure with the result I was looking for:
--Return the count of each record for each month-end during the EDate and DDate period and if DDate is blank, use todays date as the "DDate"
BTW " t_CalendarFree " is not connected to any tables.
Now I have to organize the results into the following four buckets:
1.) Less than 90 days,
2.) 91-120 days,
3.) 121 - 180 days
4.) >181 days
Please help with suggestions and formula(s)
A.) Would I use 4 different measures and name each <90 days, 91-120 days...and so on? (If so, how would this be calculated)
Or
B.) Use the buckets ? similar to :https://blogs.msdn.microsoft.com/analysisservices/2014/06/05/bucketing-values-in-dax/ (I dont really have a clue how to set this up)
Or
C.) Use a single formula with the "Switch" function? (Again how would this look)
----------------------
I use the following in calculated columns. which only help with a daily snap shot.
DaysUp:
= IF([DDate]=BLANK(),[EDate]-TODAY(),[EDate]-[DDate])+1
(returns the number of days between EDate and DDate)
AgingDays
=IF([DDate]=0,BLANK(),SWITCH(TRUE(),
INT(PReport[DaysUp])<90,"Less than 90 days",
INT(PReport[DaysUp])<121,"90-120 days",
INT(PReport[DaysUp])<181,"121-180 days",
"> 180 days"))
It would be ideal to use ONE formula...because I will be showing aging with many different columns in pivot tables.
Thank you for your time in advance.
Frankee
Needed help with editing or creating measures/calculated fields. Find expected results @ the following link: https://dl.dropboxusercontent.com/u/68876442/AgingMeasureHelpb.xlsx
After researching a many forums I was able to create the initial measure with the result I was looking for:
--Return the count of each record for each month-end during the EDate and DDate period and if DDate is blank, use todays date as the "DDate"
Code:
AgingCount:=CALCULATE(CALCULATE(COUNTROWS(PReport),
PReport[EDate] <= VALUES(t_CalendarFree[FullDate]),
IF(ISBLANK(PReport[DDate]),today(),
PReport[DDate]) >= VALUES(t_CalendarFree[FullDate])), LASTDATE(t_CalendarFree[FullDate]))
BTW " t_CalendarFree " is not connected to any tables.
Now I have to organize the results into the following four buckets:
1.) Less than 90 days,
2.) 91-120 days,
3.) 121 - 180 days
4.) >181 days
Please help with suggestions and formula(s)
A.) Would I use 4 different measures and name each <90 days, 91-120 days...and so on? (If so, how would this be calculated)
Or
B.) Use the buckets ? similar to :https://blogs.msdn.microsoft.com/analysisservices/2014/06/05/bucketing-values-in-dax/ (I dont really have a clue how to set this up)
Or
C.) Use a single formula with the "Switch" function? (Again how would this look)
----------------------
I use the following in calculated columns. which only help with a daily snap shot.
DaysUp:
= IF([DDate]=BLANK(),[EDate]-TODAY(),[EDate]-[DDate])+1
(returns the number of days between EDate and DDate)
AgingDays
=IF([DDate]=0,BLANK(),SWITCH(TRUE(),
INT(PReport[DaysUp])<90,"Less than 90 days",
INT(PReport[DaysUp])<121,"90-120 days",
INT(PReport[DaysUp])<181,"121-180 days",
"> 180 days"))
It would be ideal to use ONE formula...because I will be showing aging with many different columns in pivot tables.
Thank you for your time in advance.
Frankee