MS Access - Color cells in a query that has the same numbers in a specific column - database

In my database i have columns with information that are match togheter with a column named MsgNumber this column looks like this:
Where if it´s 1 1 the two rows have some coherent information. 2 and 3 3 3 and 4 4 4 4 and so forh all the rows are aligned that way. My goal is to get the query to order the cells by color as show in the next pictur:
I tried with condition formation but then i needed to do a seperate "report" i need to edit the rows directly in the query. (doing it manually is not an option). Can it be done? Thanks

Related

SSRS 2017 Line Up Multiple Tablix and Matrix

I am working in SSRS 2017. I have 3 sub reports, each with a USERID key that links them. The basic setup now is a master report with 1 tablix, it pulls a list of all USERIDs and then has 3 columns. Each column has sub report, 1 is a tablix and the other 2 are matrixs. When I run the report the USERID is passed to each of the sub reports and every USER ID has 2 rows, 1 for headers and 1 for data, but all 3 reports show correctly. What I am trying to do is make is it so the headers for each subreport only show on the first line or even better if they were in the true header of the Master Tablix. Code wise everything runs and works correctly. I am just trying to get the formatting to not list the headers 200 times. As a side, I am not committed to this architecture and if there is a better way to combine all these things I open. I tried combining all 3 into a single data set (unpivot the tablix and union the matrix) but then I lost all the formatting on the dates/currency etc.. I have also tried some hiding the header in the sub report with expressions, but since technically the report is only 1 line, anyway I hid it, it hides for all or none.
Update: I have been able to combined the 2 matrixes into 1, then add columns with the tables, but each is a lookup so ...50 lookups.
The above image shows the tablix with 1 matrix, as you see the headers are repeated for every group and they grow disproportionate so they cause with hidden rows. The 2nd matrix makes the issues multiple. The picutre below is the desired outcome, + one more matrix.

PowerBI (DAX) - Countif Contains Column Value (thousands of rows)

Relatively new to PBI and need a hand with counting totals of delimited values in a single column. So my source column looks something like:
ID Code
1 abc1|bcd2
2 def2|abc1|ghi3
3 bcd2
I've created a new table based on the same query that takes just this column and splits it into individual rows by the pipe delimiter:
Individual Codes
abc1
bcd2
def2
ghi3
Now I'd like to plot the number of occurences of each individual code in the original code column. I had intended on doing this using a calculated column, but I don't know if that's even the best approach. So having something like:
Individual
Codes Counts
abc1 2
bcd2 2
def2 1
ghi3 1
If it's possible to relate the tables, I'm not sure how. I've tried filter approaches similar to this but that's caused crashes. The current source data has maybe 50k rows (with 8k individual codes), but potentially these values could be 10-100x larger so I imagine it's best to avoid something that's creating filters of the source data for each row of the Individual Code table.
Much appreciated!
Original Data
Then you can split Your code column into new rows using delimiter
and then you can group your rows based on Code and count rows as below
and when you come back to Visualizations you can have your desired output

Reference a specific field in the details section to make field on the report footer - Crystal reports

My data/table that appears in the details section is pulled from SQL.
It essentially is a basic table with Row Names in column 1 and dates going across row 1 with the final column being a summation of the data.
The data is 4 rows long and what I am looking to do is create a field that I can put in the report footer that will display the same information as any one of the individual fields that is displayed in the totaled column (last column) of the table / details section.
For example if the 3rd row totaled 12 (in the details section of the report), I would like to create a standalone field that will display the 12 in the report footer.
The details section looks like a table: the report footer breaks out certain things from the details section. I need something that will allow me to reference the individual numbers in the details for example: only pull in the 18 or only pull in the 11 into its own little field on the report footer. Thanks.
Months 1 2 3 4 total
Jack 3 3 4 5 15
Will 4 7 5 2 18
Mike 1 3 3 5 12
Don 3 5 2 1 11
You need to manipulate by storing in the array and retriving one by one.
To store in array:
Create a formula #Total
Shared Numbervar array x;
x:=x+(total);
total
In report footer write one more formula #display
Shared Numbervar array x;
x[1] // first element in the same way 2,3,4 will give you all elements
Let me know in case any issue.

Excel 2010 Pivot Table: Count based on 2 flags

*I'd like to ask that you please do not just say "add a column to your data that..."
*I want to know if the pivot table itself can do this.
My data comes from a sql query. The query is inserted into excel via the Data->From Other Sources path. So, going in to edit the query within excel, or open the query itself, editing, and repasting is not ideal, especially when the excel file needs to be distributed.
My raw data is set-up like this. I've put zeros in for blanks, but my flags are either 1 or blank (empty cell)
id costa costb names ... ... flagA flagB flagC
1 1000 2000 apple ... ... 1 1 1
2 2300 1200 brake ... ... 1 0 1
3 4600 3400 candy ... ... 0 1 1
4 6900 4300 drill ... ... 1 0 0
I want my pivot table to COUNT occurence of items that are flagb and flagc.
Usually with only one flag. Your calculated field will be a SUM with formula ='flagb'
How can I make the field bebased on two flags, not just one?
Again. I don't want to add a new column to my data as certain flags do not correlate easily, and I have to change the orignial SQL file, as well as the query inserted to excel to stay consistent. Also, I feel the pivot should be able to do this. Any solutions?
use a calculated field, and put the formula as = AND(flagB=1,flagC=1)
you can use multiple tests if you need to check for specific flags, just separate each test with a comma within the AND test (and more complex tests can be made with OR, or combinations of them both

Reporting Services - Calculating row totals/percentages in a table

I am trying to calculate totals for each row as well as a percentage of the overall total.
Right now I have a table like this:
Blah Col1 Col2 Col3
-----------------------------
ABC 1 1 1
DEF 2 2 3
-----------------------------
Total 3 3 4
And I want it to include totals/percentages like so:
Blah Col1 Col2 Col3 Total %
--------------------------------------------
ABC 1 1 1 3 30%
DEF 2 2 3 7 70%
--------------------------------------------
Total 3 3 4 10 100%
I know I can do the calculations in the SQL query, but the stored procedure is rather complicated so I'd like to avoid that if possible. So I'm wondering if there's a simple way to achieve this in SSRS.
Right now I just have a row group for each Blah which I use to calculate column totals.
I added a Totals Row for my matrix, then I referenced the totals textbox (textbox 8 in my case) for the column and I did:
Sum(Fields.FieldName.Value)/ReportItems!Textbox8.Value
I hope this makes sense!
To calculate the total, just do a simple sum using the + operator. For the percentage, you can refer to the grand total using ReportItems!ItemName.
You can use aggregate functions in Reporting Services like "SUM" and "AVG" to achieve what you are trying to do. The way it works is "Detail" parts of groups in SSRS tables will list all of the data, while non-detail parts (like headers and footers) of groups can be used for aggregates like:
=SUM(Fields!TestValue.Value)
http://msdn.microsoft.com/en-us/library/ms159134%28v=sql.90%29.aspx
Let me know if you need any more help.
Create two groups, one on a column that is the same data for each row, then one on column blah. add a row for the emcompassing group and do a sum there.
you can simply do as following:
Sum(CInt(Fields!TestValue.Value))
or Sum(CInt(Fields!DollarAmountOfCheck.Value),"DataSet1")
sometime when data is coming through WCF, it does not accept Sum() function. but this works fine in that case.

Resources