MS Access 2010 Report Grouping-Sorting issue - sorting

I Have an app that creates a report from a query (nothing special in that right?).
The query runs perfectly and everytihng is in the order I require for my report.
However when I group records in the report the sort order is mucked up. Looking at the report groups options I can only sort groups in ascending or descending order. I don't want either.
I don't want the report group to sort in any order other the sort order within the query i.e.
Bin: 100
Shelf: 1
Cat: Film
Item: First item
Bin: 101
Shelf: 1
Cat: Film
Item: Second item
Bin: 102
Shelf: 2
Cat: Film
Item: Third Item
Bin: 103
Shelf: 3
Cat: Roll
Item: Roll One
Bin: 104
Shelf: 1
Cat: Roll
Item: Roll number two
I want all items to display in Bin order by grouped by Shelf then Cat. However because of a-z or z-a in grouping it stuffs up the bin sorting order as per below.
Bin: 100
Shelf: 1
Cat: Film
Item: First item
Bin: 101
Shelf: 1
Cat: Film
Item: Second item
Bin: 102
Shelf: 2
Cat: Film
Item: Third Item
Bin: 104
Shelf: 1
Cat: Roll
Item: Roll number two
Bin: 103
Shelf: 3
Cat: Roll
Item: Roll One
Anyone have any clues on how I can get around this limitation.

Access Reports ignore the query sort order.
You set the sort order in the report.
By definition it does not make sense to sort a report group by anything other than itself.
However you do not need to show the grouping field/expression, you are welcome to show whatever field you wish in the report header.
In your case you can group by the criteria you use to sort your query.

Related

Amazon QuickSight - Single Activity ID has Multiple entries - need to SUM one column but display only ONE VALUE from another column

I have been working on this for some time, but have come up empty.
I have a data set called 'Technical Assistance'.
In that data set, there is a column with the 'ActivityID', another column 'NumberAssisted', and a third column 'ContactHours'.
The issue is that for each ActivityID, there can be multiple entries, each with its own NumberAssisted and ContactHours.
Additionally, for EACH ACTIVITYID I need to show NUMBERASSISTED as a SUM, but only display CONTACTHOURS once (no sum, no calculation at all, just display).
In my example scenario, I have ONE Activity ID with FOUR entries - Each entry has a Number Served, and Contact Hours. By using SUM, I can get the correct Number Assisted (5), but cannot figure out how to get Contact Hours to display what I need. It SHOULD DISPLAY as 0.5 based on the scenario below:
ActivityID NumberAssisted ContactHours
101 1 0.5
101 1 0.5
101 1 0.5
101 2 0.5
TOTAL: 5 0.5
Thank you for any guidance!!
Troy

Store a tree structure as a table

Let me describe the one record structure in pseudo-code:
Record
UserName
E-mail
Items[8]
ItemPropertyA
ItemPropertyB
ItemPropertyC
ItemPropertyD
ItemPropertyE
There are 1-8 items in a record and exactly 5 properties each in each item. So I need to store these many records as (excel) table and I want it to be human readable, if possible. The straitforward approach is to put items and properties in 8 * 5 = 40 columns, but this is difficult to review. I'm going to place a JSON array of properties in each cell (one celll per item), using as many cells in each rows as needed. I'm just curious about other tree-to-table possibilities.
There is an alternative to 40 separate columns (some of which may be unused if there are fewer than 8 items in a record). You can use database style normalized records:
SHEET 1
RecordId UserName Email
1 Bobby bobby#example.com
2 Susan sueb#example.com
SHEET 2
RecordId ItemId PropertyA PropertyB PropertyC PropertyD PropertyE
1 1 Chocolate Electric Round Silver Hebrew
1 2 Raspberry Steam Trapezoid Brass Esperanto
1 3 Durian Gravity Bezier Titanium Bahasa Melayu
2 1 Vanilla Solar Rhombus Copper Pashto
Of course you could normalize even further and have just a single Property column, but the above seems perhaps enough when you know each item has exactly the same five properties.

MSBI: how to create a measure with DAX that implements statistical de-identification?

I need to apply statistical de-identification rules in an MSBI Tabular model. An example of the kinds of rules I'm trying to implement are: if N < 20,000, then any row less than 11 must be combined with other rows.
Example: I reports counts of Foo by Dimension Bar. Since the total (in this ALLSELECTED context) is less than 20K Foo, this output is not valid:
Bar 1: 500
Bar 2: 400
Bar 3: 100
Bar 4: 11
Total: 1011
The valid output would be valid:
Bar 1: 500
Bar 2: 400
Bar 3 & 4: 111
Total: 1011
I want to use a measure so that when users change from Dimension Bar to Dimension Baz, or when I change the slicers being used, I want these rules to recalculate on the fly - so just combining the rows for that one dimension in the model is not the solution I'm looking for. Thanks!
Have discovered that DAX is the wrong place to implement this - we are doing this in MDX. Please see this link for the question and solution regarding how we did that.

Mahout recommender returns no results for a user

I'm curious why in the example below the Mahout recommender isn't returning a recommendation for user 1.
My input file is below. I added blank lines to enhance readability. This file will need the blank lines removed before it's run through Mahout.
The columns in this file are:
User ID | item number | item rating
1 101 0
1 102 0
1 103 5
1 104 0
2 101 4
2 102 5
2 103 4
2 104 0
3 101 0
3 102 5
3 103 5
3 104 3
You'll note that item 103 is the only common item that all 3 users rated.
I ran:
hadoop jar C:\hdp\mahout-0.9.0.2.1.3.0-1981\core\target\mahout-core-0.9.0.2.1.3.0-1981-job.jar org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -s SIMILARITY_COOCCURRENCE --input small_data_set.txt --output small_data_set_output
The Mahout recommendation output file shows:
2 [104:4.5]
3 [101:5.0]
Which I believe means:
User 2 would be recommended item 104. Since user 3 rated item 104 a 3 this may account for the 4.5 recommendation score vs. the result below…
User 3 would be recommended item 101. Since user 2 rated item 101 a "4" this may account for a slightly higher recommendation score of 5.
Is this correct?
Why isn't user 1 included in the recommendation output file? User 1 could have received a recommendation for Item 102 because user 2 and user 3 rated it. Is the data set too small?
Thanks in advance.
Several mistakes may be present in your data, the first two here will cause undefined behavior:
IDs must be contiguous non-zero integers starting at 0 so you need to map your IDs above somehow. So your-user-ID = 1 will be a Mahout-user-ID = 0. The same for items, your-item-ID = 101 will be Mahout-user-ID = 0.
You should omit the 0 values from the input altogether if you mean that the user has expressed no preference, this makes the preference "undefined" in a sense. To do this omit the lines entirely.
Always use SIMILARITY_LOGLIKELIHOOD, it is widely measured as doing significantly better than the other methods unless you are trying to predict ratings, in that case use cosine.
If you use LLR similarity you should omit the values since they will be ignored.
There are very few uses for preference values unless you are trying to predict a user's rating for an item. The preference weights are useless in determining recommendation ranking, which is the typical thing to optimize. If you want to recommend the right things in the right order toss the values and use LLR.
The other thing that people sometimes do with values is show some weight of preference so 1 = a view of a product page and 5 = a product purchase. This will not work! I tried this with a large ecommerce dataset and found the recommendations were worse when adding in product views, even though there was 100 times more data. They are fundamentally different user actions with different user intent and so can't be mixed in this way.
If you really do want to mix different actions use the new multimodal recommender based on Mahout, Spark, and Solr described on the Mahout site here: It allows cross-cooccurrence type indicator calculations so you can use user location, likes and dislikes, view and purchase. Virtually the entire user clickstream can be used. But only with cross-cooccurrence correlating one action to the canonical "best" action, the one you want to recommend.

How to Count a Group in Telerik Reporting?

I have a report with items, ingredients and recipes. I am grouping by items so that I can create lists of recipes that contain that particular item. For example:
Item 001 Egg
Recipe 1
Recipe 2
Recipe 3
Item 002 Flour
Recipe 1
Recipe 2
I have a subtotal under each Item group that counts the number of Recipes. I am trying to get a subtotal at the very bottom of the report to count the number of Item groups. In the example above I would expect the total to be 2, however my report outputs the total as being 5 because each recipe contains the item. How can I count just the number of groups?
I am not 100% sure that this will help, but try RowNumber(), it is one of the functions. Adding to a textbox in the GroupFooter might give you the required output.

Resources