Tablix column formatting values - visual-studio-2010

I have a tablix with several columns. One of columns has discount percentage values. I want to change the font to white if all of the rows have value 0, and if some of the cells have different value, I want all the values to apperar black.
I have set the Font Color value to:
=IIF(SUM(Fields!Discount.Value)=0, "White", "Black")
When all columns are 0, everything shows up white.
The problem is when some of the values are not 0, they show up black, but the 0 values are white and there are empty cells.

If you're using this expression in the detail row of the Tablix, you might need to add a Scope paremeter to your Sum clause, something like:
=IIF(SUM(Fields!Discount.Value, "DataSet1")=0, "White", "Black")
This is because the Sum will execute in the current Scope unless another is specified, so your expression will only consider the current row. Adding the scope as above will consider all rows in the Dataset.

Related

Filter a chart directly in libreoffice calc

I have a chart which shows the data I want when I filter for values > 0 on a single column. But I would like to have this filter inside of the chart itself so that I can look at the workbook with no filters, and still see the chart with the zero values filtered out.
So I want the first row to appear in the chart because the last value is > 0, but I want the chart to ignore the 2nd row because the last column value == 0
Is there some way to set a filter on the chart itself?

Google Sheets sum of columns where cell value matches multiple columns in another sheet

I need a formula in Google Sheets which will lookup a cell across multiple columns in another sheet and return the sum of cells where that value is contained.
Here's my sheet:
https://docs.google.com/spreadsheets/d/1Z2XUqG1_3g0N__5Ab1R-8Dr8Bk-Z88x6nYvOdhYw78Q/edit?usp=sharing
just filter it inside of SUM like:
=SUM(FILTER(Sheet2!C$2:C, (Sheet2!A$2:A=A2)+(Sheet2!B$2:B=A2)))
You could try sumproduct:
=sumproduct(Sheet2!A:A=A2,Sheet2!C:C)+sumproduct(Sheet2!B:B=A2,Sheet2!C:C)-sumproduct(Sheet2!A:A=A2,Sheet2!B:B=A2,Sheet2!C:C)
The first two sumproducts add col C values if either col A or col B matches the colour.
The third sumproduct removed the double count where both col A and col B match the colour.
You can Add 3 columns red flag,green flag and blue flag.
then use IF function and but 1 if it belongs to the color.
=if( OR( A2="red",B2 ="red"),1,0)
then you create a new 3 columns red count, green count and blue count
and multiply Quantity by the color flag.
=C2*H2
then use Sum function to add it in the other sheet
=sum(Sheet2!K2:Sheet2!K10)

using icCube HSL color formula to set the color for the amChart values

Following the answers on my previous question in June, I would like to use the icCube HSL() formula to define the colors of the chart members in the amChart widget.
In the standard schema Sales I use the following MDX:
with
member [measures].[hue] as 16
member [measures].[saturation] as 1-indexof([Rubriek].[Rubriek].currentmember.siblings,[Rubriek].[Rubriek].currentmember)/30
member [measures].[lightness] as 0.2+ordinal(level([Rubriek].[Rubriek].currentmember))/10
member [measures].[color-hsl] as hsl([hue],[saturation],[lightness])
member [measures].[color-fixed] as "#FF0000"
SELECT
{ {[Measures].[Amount],[measures].[color-hsl],[measures].[color-fixed]} } ON COLUMNS,
{ [Product].[Product].firstNotAllLevel().allmembers } ON ROWS
FROM [Sales]
I have added 2 color fields:
color-hsl = the HSL defined color based on level depth of the product hierarchy and the position of the member among its siblings
color-fixed = just a hexadecimal color, for testing purposes
Now when I define a combo chart, I can set the color field in the 'Advanced properties':
[{"colorField":"color-hsl"}]
Except, this does not give me the calculated colors. But, if I change the colorField to color-fixed it gives me the red color as defined.
Questions:
How can I achieve that the color-hsl is working. Do I have to convert it to a hexadeximal string? How can I achieve that?
How can I get rid of the data value for color-hsl. I only want to use this as a field to define the color, not the value (that is the "Amount") field in my mdx?
The color function in MDX returns an integer value, e.g. 2334. If you want to use it in a browser you've to convert it to the hexadecimal string representation :
ToHexColor( colorAsInteger ) that returns

NVD3 X axis incorrect ordering (dates)

I'm trying to visualize 2 series but when I visualize them together, the dates don't go in sequential order anymore.
Here is the fiddle: http://jsfiddle.net/hohenheim/6R7mu/21/ Notice the weird x-axis.
Is there a way to fix the x axis on nvd3?
The data looks like this:
data1 = [{
"date": 1396828800,
"impressions": 49145385
}, {
"date": 1396915200,
"impressions": 46704447
} ....
The NVD3 "multiBarChart" uses an ordinal (category) scale, so it will only display the x-values you give it, in the order in which they are added to the scale. Because your two series only partially overlap on the x axis that's causing problems.
Unlike other NVD3 chart types, the multiBarChart doesn't give you the option of setting your own scale -- it needs to use an ordinal scale in order to generate even widths for the bars. However, you can set the x domain (the list of categories to use for each bar), by calling chart.xDomain(arrayOfXValues).
The array will need to be an ordered array of Date values that spans your data. In order to generate it, you'll need the d3 time intervals range functions. You might also need the d3.extent function to find your max and min values.

How to match the columns with the divisions of the axis Y in a Histogram chart .rdlc file

I'm just trying to match the markers (blue arrows) with the division of axis Y (red arrows).
I tried this by modifying the property values of the property 'Custom Attributes'. I couldn't do it so far.
I found that if I change the property 'DrawSideBySide' to False, all columns will match the division of axis Y!.
... yup.. pretty dummy of my part but at least I found the answer

Resources