PowerBI - Conditional formatting of specific cells - excel

This is what I have created on Excel:
I am trying to publish it on Power BI. I am struggling to find a setting to color specific cells according to what I have created in Excel.
The conditional formatting guide (https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-conditional-table-formatting/) suggests coloring the cells based on the value, but I want the colors to be static regardless of the values.
Question: How can I choose to color the cells according to my specific requirement?

What you're looking for is called Column Formatting in Power BI. You can find it in the format pane in Table or Matrix visualizations.
However, the best you can do is formatting per column level (and header / total), for font color and background color. Per cell level is not available in Power BI yet. You may consider submit a feature request to Power BI if you want to.

How can I choose to color the cells according to my
specific requirement?
There is an option to develop a custom visual with this behaviour.
There's a table visual template you can use as a start.

Thank you Foxan and user5226582. I am not sure if this answer is appropriate to SO's requirement for an answer, but in the end I did a hacky way of taking a screenshot of the colour without the values from Excel and inserted it as a background image to the table on PowerBI.

For each cell you need to do the following:
extract
column name, and
value in 1st column (HI/CoF ($)) of current row,
take the last symbol from both,
convert it to number and
check resulting values in conditional formatting to determine color.
As an option, you may add both numbers and assign color according to the sum: 2 is green, 14 is red, other colors between. However, it probably wouldn't result in exactly same color matrix as is in your example.

Related

How to alternate hue of rows in an Excel (or Google Sheets) spreadsheet where every column is a different color?

I've got a bit of an oddball question, and I looked pretty hard to find an answer to no success so apologies in advance if this has already been answered.
Anyways, I have an excel spreadsheet that has every column manually set to a specific color. Now I want to alternate the hues between rows while maintaining the manually-set color. So for example, let's say column A is red and column B is blue. I would want A1 to be dark-red, B1 to be dark-blue. A2 would be light-red, B2 would be light-blue. And so on and so forth alternating until the end of the sheet.
I've thought about sampling the previous cells color and setting the next cells color based on that, but I don't know of any functions that would get me there.
I've looked at macros, and while I can sample a cell's color I cannot figure out how to set it.
I'm currently building the sheet in excel and would like to import it to google sheets when I am complete, so having the spreadsheet formulas or macros be compatible would be great. That being said, I can keep it in excel if I have to so that isn't a must.
Any help would be much appreciated!
you need to set up 4 conditional formatting rules with:
=ISODD(ROW())
=ISEVEN(ROW())
Also, I would suggest you to check this addon with which you can control colors easily just by hex code (#ffda56) https://chrome.google.com/webstore/detail/team-color
TeamColor is a Google Spreadsheet add-on for color management. Type a color code in Hex into a cell. Its background color will change to that color code. This is very useful for sharing color palette with teammates in developing apps, websites and anything else colorful.
You can do it with conditional formatting by selecting the column and then use a custom formula conditional format and enter =isodd(row()) then select your dark hue. Add another conditonal format and enter =iseven(row()) and select your lighter colour.
This method breaksdown when using a filter but you can create a column to count visible rows and then base your conditional formatting formula on that column. Bit more complicated but useful if you need to filter.
Another Sheets option is to apply Alternating colours... (under Format) but this would mean setting the two (or three if including a header of a different hue) colours separately for each column.

DAX : color data, based on value

I am looking for a way to color my data value using coding. Say for -ve value red color and +ve value green color. Is there any formatting dax function or any other way so that visually it would be easy for end user of pivot table. Note I would not like to go for conditional formatting in excel. My end user need not do any steps in excel itself. thanks
DAX functions have no way to do excel cell formatting/color. It is a requested functionality on microsoft site for DAX. thanks

Excel: How to do conditional formatting based on two cell values?

This particular question is regarding highlighting dates on a pre-made calendar.
Please see screenshot below:
I need to highlight the cell in the calendar that matches both the task and the date in the data table. For example- see L3 and P4. In the screenshot they are highlighted manually for demonstration.
Can someone please help me out with this. I've been using AND, but screwing up somewhere with the $.
If you aren't entering any data and using this as a visual tool you can spoof the spreadsheet by placing a period into the cell that matches the values you need, and then conditional format based on specific text and enter the period as the text.
This image demonstrates it as two separate tables; One with only the formula used to look for the values, and the second one formatting the background and font to be the same color (effectively hiding the period)
It its definitely a workaround and will only work if this is a visual tool.
Assuming your Data Table goes down to row 7, try entering this Conditional Formatting formula with cell B3 selected:
=COUNTIFS($AI$4:$AI$7,$B3,$AJ$4:$AJ$7,C$2)>0

3-Color Scale to change color in different columns from data in another column

I have an Excel document with First Name and Last name in columns A and B. Data related to those names in column C in Percentages.
I have been able to conditionally format percentile in the data column C based on values in a 3-Color Scale but I need the Names in Columns A and B to change color from the data in C using the same 3-Color Scale formula. I cannot seem to find anything online that teaches or shows me how to use 3-Color sliding scale to change color in different cells than data it is reading.
Can someone please show me how to match color or use IF formula to change color of columns A and B (names) from data in C (Percentages) and keep 3-Color sliding color scale?
Based on Excel 2007 (but you've waited a while for any other response) you may notice that if you use Format Painter to copy the colour scale to your First Name and Last Name columns their highlighting did not change. However I think you will find that if you then, temporarily, replace a name with a number highlighting is acquired. The conditional formatting rules have been copied by Format Painter but there is no visible change. The reason I think is because the colour scales are numeric and simply are not applicable to names. If you want to copy the colours you will probably need VBA (though your question is not tagged with that).

Excel: Conditional formatting (colour scale), IF top of column matches a value

I'm a maths teacher and I'm storing my class data in an Excel spreadsheet. Each student occupies a row. Some columns relate to homework completion and they get a certain colour scale formatting. Other columns relate to test scores and they get a different colour scale formatting.
At the moment, when I add a new column for e.g. another homework exercise, I have to edit the rules manually, so the correct colour scale rule will apply to that particular column. This is quite fiddly and annoying.
I would like to make a single conditional formatting rule for the table that will apply a colour scale highlight to cells based on their values (e.g. red for 0, yellow for 0.5, green for 1), but ONLY if a cell at the TOP of that column matches a particular value.
To put it another way, I want my column headings to contain indicators for what kind of values go in the column, and I want Excel to apply different colour scale rules to each column based on the indicator at the top.
Is there a way to do this?
(My apologies if this is a duplicate question; I've searched but couldn't find something that connected conditional formatting based on a column header with a colour scale highlighting rule)
Excel's built-in colour scales don't take into account any other factors than the values in the range.
If you want to base the conditional formatting on a combination of factors, you will need to create several conditional formatting rules for the column. You can then copy and paste the format of that column to another column. You can adjust the specific parameters for that column by editing its rules.
Any more detailed advice can only be supplied if you provide a data sample.

Resources