Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Colour coding in my excel output

Manjari
8 - Asteroid

Hi All, 

 

 

Requesting help with color coding I want the output to look like this with all the other columns 

Here is my sample data set, where I want to insert the color code before the container starts

 

Color code output.png

 

Please post questions if you have.

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @Manjari 

 

I dont only words coloring is supported. Its either complete row or complete column based on any condition.

Similar to excel conditional formatting.

Qiu
20 - Arcturus
20 - Arcturus

 

@Manjari 
I agree with @atcodedog05 , we can do something also for the whole row but not part of the data.

 

Qiu_0-1604321770723.png

 

patrick_digan
17 - Castor
17 - Castor

@Manjari What words should be highlighted? Here's an example where I'm highlighting every teams and book word in red. The table tool uses code that is/resembles html so you can use a formula tool to change it. I'm just using a span statement and then applying the color via a style variable:

 

patrick_digan_1-1604323628569.png

 

 

patrick_digan_0-1604323590244.png

 

 

atcodedog05
22 - Nova
22 - Nova

If tools arent enough to get the required output.

 

Break into code 😂 seen a lot of pros do it

 

Amazing workaround @patrick_digan 🙂

 

Thank you for this great learning 😀

Manjari
8 - Asteroid

Thank you @patrick_digan 

 

I want to change all the values in the column [New keywords] to color red, 

I tried using this formula does not seem to work. requesting help 

 

if [New keywords] = "0" then Null() else ('<span style="color:#ff0000;">[New keywords]</span>') endif

Maskell_Rascal
13 - Pulsar

Hey @patrick_digan 

 

Is there a reason why the Layout Tool stops processing the table information after selecting it? The workflow works perfectly when first downloaded like below:

 

Maskell_Rascal_0-1604330619042.png

 

But the moment I select the Layout Tool, or add my own, it stops working and doesn't build the table. 

 

Maskell_Rascal_1-1604330698337.png

 

Thanks!

Phil

patrick_digan
17 - Castor
17 - Castor

@Manjari you would have to put that text after the table tool. instead, I add the word Replace before and after the words that need changed in your formula (11) tool:

patrick_digan_0-1604331425607.png

Then I can use regex after the table tool to add the red and delete the REPLACEs:

 

regex_replace([Table],"REPLACE(.*?)REPLACE",'<span style="color:#ff0000;">$1</span>')

 

Hopefully that gets you closer, and you can tweak to match what you need.

 

 

 

patrick_digan
17 - Castor
17 - Castor

@Maskell_Rascal the layout tool is figuring out that we've monkeyed around with the data 🙂 I'm just using the layout tool to convert our text back to a reporting element. I should have done the same thing with the render tool and then it wouldn't have broken when you clicked on it.

 

To build this, I connected the table tool to the layout tool and set it up. Then at the end, I connected my formula tool to the layout tool. So long as you don't click on the layout tool, it will work. In the future, I should have just gone from the table to the render, set it up, and then connected my formula to the render. That would still work when click on it.

 

As a workaround, I have this macro I built today which I haven't tested on other data...BUT you should be able to feed the modified data through it and then alteryx will think it's a valid field reporting element again.

Before (it's just a string field because I changed it in the formula tool):

patrick_digan_0-1604331941901.png

 

After (it's back to a reporting element like normal):

patrick_digan_1-1604331973464.png

 

My macro is just using the report text field in expert mode to convert the string back to a reporting element.

 

patrick_digan_2-1604332023296.png

 

And sorry for the long post, but the metadata "source" column needs to start with Report: for the reporting tools (like layout and render) to recognize the data as a reporting element. Here's the metadata after my macro which shows Report:text in the source column for the field we've converted:

patrick_digan_3-1604332135224.png

 

Maskell_Rascal
13 - Pulsar

@patrick_digan Brilliant! I'm fairly new to using the reporting tools, so appreciate the additional information. 

Labels