-
1. Re: question regarding custom formatting
Norbert MaijoorJan 15, 2018 1:01 PM (in response to Colleen Reynolds)
Hi Colleen,
Find my approach as reference below and stored in attached workbook version 10.3 located in the original thread.
1. M1. Loan Adj: If [Category]="Category1" then [Loan]*100 else [Loan] end
2. D1. Loan: if [Category]="Category1" then str([M1. Loan Adj])+"%"else str([M1. Loan Adj]) END
3. Drag the required objects to the indicated locations.
Regards,
Norbert
-
loan_nalmai_10.3.twbx 13.9 KB
-
-
2. Re: question regarding custom formatting
Hari Ankem Jan 15, 2018 1:03 PM (in response to Colleen Reynolds) -
3. Re: question regarding custom formatting
Colleen Reynolds Jan 15, 2018 2:10 PM (in response to Norbert Maijoor)Norbert, Thank you so much. This worked nicely except I lost my formatting for the numbers that are not percentages. Is there a way to get the comma back. My numbers are being displayed as
Category A 22250 instead of 22,250
Category B 6.33% is exactly what I need.
-
4. Re: question regarding custom formatting
Norbert MaijoorJan 16, 2018 8:09 AM (in response to Colleen Reynolds)
Hi Colleen,
Apologies for late reply but was "out of the office" this morning;) Find my updated approach as reference below and stored in attached workbook version 10.3 located in the original thread.
1. M1. Find ".": find(str([Value]),'.')
2. D1. Value Adjusted: str([Value])
3. D2. Value2 Adjusted: str(mid(str(ROUND([Value]*100,2))+"%",1,[M1. Find "."]+2)+"%")
4. D3. Measure Display: if [Category]="Category1" then [D1. Value Adjusted]
elseif [Category]="Category2" then [D2. Value2 Adjusted]
END
5. Drag the required objects to the indicated locations.
Regards,
Norbert
-
Display as Text_nalmai_10.3.twbx 14.7 KB
-
-
5. Re: question regarding custom formatting
Colleen Reynolds Jan 17, 2018 6:59 AM (in response to Norbert Maijoor)Thank you again for your suggestions. It seems to work well for the percentages but I still can't get the numbers to display the comma. I just need the 22250 to display as 22,250. Do you know how I can do that? It seems like it would be the default but apparently not. I only have version 10.0 so can't view your attachment.
-
6. Re: question regarding custom formatting
Norbert MaijoorJan 17, 2018 3:08 PM (in response to Colleen Reynolds)
Hi Collleen,
Find my updated approach as reference below and stored in attached workbook version 10.0 located in the original thread.
1. D0. Category 1: STR(If [Category]="Category1" then ([value]) end)
2. M1. Count Char in String: LEN(str([D0. Category 1]))
3. D1. Right 3 String: RIGHT([D0. Category 1],3)
4. D2. Left Remaining String: left([D0. Category 1],[M1. Count Char in String]-3)
5. D3. Display Category1: [D2. Left Remaining String]+","+[D1. Right 3 String]
6. M0. Find ",": find(str([value]),'.')
7. D4. Display Category2: If [Category]="Category2" then str(mid(str(ROUND([value]*100,2))+"%",1,[M0. Find ","]+2)+"%") end
8. D5. End Display:
if [Category]="Category1" then [D3. Display Category1]
elseif [Category]="Category2" then [D4. Display Category2]
END
9. Drag required objects to the indicated locations.
Regards,
Norbert
-
7. Re: question regarding custom formatting
Colleen Reynolds Jan 23, 2018 6:33 AM (in response to Norbert Maijoor)Thank you Norbert. This was very helpful.
-
8. Re: question regarding custom formatting
Norbert MaijoorJan 23, 2018 6:39 AM (in response to Colleen Reynolds)
Hi Colleen,
You are welcome. Glad it worked out for you. Thanks for the "Badge". Appreciated.
Regards,
Norbert