Conditional formatting in matrix cells - matrix

I have the following matrix loaded:
I need to change the font color of the BB column values ​​when the value is below the value contained in the MIN column cell.
Being grouped columns, the MIN column will not always be in fourth place. How can I do to compare values ​​taking into account the name of the columns?
Thank you!!
I share the output of the dataset:

I have found a solution based on our discussion in the comments:
Create a calculated field in your dataset Ref = ELEMENT + COMPONENT (concatenate the 2 colums, this will be used later)
In the Row Group properties, add a variable MinVar =lookup("MIN" & Fields!Component.Value ,Fields!Ref.Value,Fields!Value.Value,"DataSet1") (replace DataSet1 with your dataset name)
In the font expression of the value field add an expression =if(Fields!Element.Value ="BB",if(Me.Value< Variables!MinVar.value,"Red","Black") ,"Black")
I have tested this and it is working on my end.

Related

Google Sheets: When there are dupe values in a column, determine which value should be included by comparing corresponding dates in a date column

I have a dataset with an ID column and Edit Date column. There are some duplicate IDs but the Edit Dates will be different for each dupe ID. I created 2 helper columns to help me determine if I need to include the row of data in a separate analysis I'm working on. I included Notes in the sample dataset, with a short description of each column.
I want to include any rows that:
Have Count value = 1
or
Have Count value >1 but the Edit Date value for its corresponding ID is the lowest value of all Edit Dates listed in all rows this value is in
I don't want to include any rows that:
Have Count value >1 and Edit Date value that not the lowest Edit Date for the corresponding ID
So far all I have is the first part...I'm having trouble figuring out how to go about the comparison when Count >1, so any help would be greatly appreciated.
This is all I have so far...
=IF(C2:C=1,"YES",...?)
Thank you in advance!
try:
=ARRAYFORMULA(IF(A2:A="",,VLOOKUP(A2:A&B2:B,
{SORT(A2:A&B2:B, B2:B, 1), IF(COUNTIFS(SORT(A2:A, B2:B, 1), SORT(A2:A, B2:B, 1),
ROW(A2:A), "<="&ROW(A2:A))=1, "yes", "no")}, 2, 0)))

Sorting String Numeric Numbers in SSRS Matrix

I have a column in my matrix table that is a varchar containing numeric values (stepName). In the report, it prints off as 1,10,11... 2,20,21,22... etc instead of 1,2.. 10, 20.
I found another question that suggested either converting the varchar values to int and then sorting, or adding a datatype numeric column and using that to sort. (sorting string numeric values in SSRS 2008)
I can't convert the varchar values to int as I have about 50/50 varchar/numeric values. I actually have a numeric sequence column, but when I tried to use this as a sort both in the query, the column tablix properties and the list tablix properties, it still didn't sort. What am I missing? Thank you!
select hrss.salaryScheduleCode, hrss.salaryScheduleName, st.stepName, st.seq, sl.laneName
from dbo.HRSalarySchedule hrss
left join dbo.HRSalaryScheduleStep st on st.hrSalaryScheduleID = hrss.hrSalaryScheduleID
left join dbo.HRSalaryScheduleLane sl on sl.hrSalaryScheduleID = hrss.hrSalaryScheduleID
order by hrss.salaryScheduleCode, st.seq, sl.seq
Change the sorting of the tablix to use an expression:
=CInt(Fields!stepName.Value)
Edit:
Ok, I misunderstood the 50/50 thing with varchar/numeric values, so here's a better solution.
The Val function evaluates a leading numerical value, so I suggest to create 2 sorting columns:
Expression =Val(Fields!stepName.Value)
Field stepName
This will for example create a sort order like this:
Here's a screenshot to clarify what to configure:

How to split a Webix datatable column into multiple columns?

In my webix datatable, I am showing multiple values in the cells for some columns.
To identify which values belong to which header, I have separated the column headers by a '|' (pipe) and similarly the values under them as well.
Now, in place of delimiting the columns by '|' , I need to split the columns into some editable columns with the same name.
Please refer to this snippet : https://webix.com/snippet/8ce1148e
In this above snippet, for example the Scores column will be split into two more editable columns as Rank and Vote. Similarly for Place column into Type and Name.
How the values of the first array elements is shown under each of them will remain as is.
How can this be done ?
Thanks
While creating the column configuration for webix, you can provide array to the header field for the first column along with the colspan like below:
var columns = [];
columns[0] =
{"id":"From", "header":[{"text":"Date","colspan":2},{"text":"From"}]};
columns[1] =
{"id":"To","header":[null, {"text":"To"}]};
column[0] will create Date and From and column[1] will be creating the To.

Using XPath to find rows where a specific column has value

I'm having trouble using XPath to find a row in a table where a specific column contains a value. The table has 10 columns where 2 of them will show Yes|No but I'm only interested in finding the value in one of the columns (the 4th one). My initial attempt was this:
//table[#id='myTable']/tbody/tr/td[text() = 'Yes']
but it finds it rows from both columns. I thought I could try something like this but it's not a valid expression:
//table[#id='myTable']/tbody/tr/td[4]/text()='Yes'
Any suggestions? Thanks.
You can try this way :
//table[#id='myTable']/tbody/tr[td[4][. = 'Yes']]
The XPath return row (tr) having the forth td child value equals "Yes".

Spotfire Expression Value for Max(Row Count)

I'm trying to make a Calculated Value Control expression on the below columns:
Row Count | Date | Value
What I want to get is the Value for the 'newest' date, which will also be the highest row count. How can I write an expression to get this, it seems like it ought to be simple. I'm having trouble writing it in only expression language, without SQL.
Using the expression below you can limit the records in your table to those with the highest (aka most recent) date which should have your Value of interest.
[Date] = Max([Date])
You can do the same with row count since you mentioned the record of interest being the highest row count:
[Row Count] = Max([Row Count])
If you're looking to create a calculated column you can use a case statement to spit out the value:
case when [Date] = Max([Date]) then [Value] end
Lastly, should you want to display this value in a Text Area to show off your value you can utilize the calculated column above:
1) Create a new Text Area
2) Type some text about what it is: "Value for newest Date: " (optional)
3) Click "Insert Dynamic Item" -> "Calculated Value"
4) Under "Data" ensure the appropriate data table is selected. Note: You can uncheck the "Use Current Filtering..." box here if you do not want your value to update as you filter.
5) Under Values, utilize our calculated column with "Max" wrapped around it to avoid Summing duplicate values:
Max(CALCULATED_COLUMN)
Here is a screenshot of my work with random filler dates and values: http://i.imgur.com/hFapS8c.png
The larger text is to show the calculated value dynamic items. I used Max([Date]) for the date value.

Resources