On the paper it was simple to do, but at the end I'm stucked.
Herebelow the chart I would like to produce (I took an easy example to understand the objective to reach):
On this chart we see that the series for each product are well colored and well structured for each cart.
Now, let's jump on my problem: the data structure.
In my world, data is coming from a database, so the data are structured like that:
I managed to aggregate the values but I loose colors of my series and I need absolutely to identify visually the different product volumes.
Is there any possiblity to reach the first stacked chart layout but with the second dataset format ?
Yes, transfer your data and chart from there (I don't think there's a native solution for this, but happy to learn otherwise).
For example, use =QUERY([data],"select [cart], sum([qty]) group by [cart] pivot [product] label sum([qty]) ''",1) replacing the terms in the brackets with the respective column letters (e.g. B if cart is in column B).
Related
I try to configure the formula (SUM) field in the iForels database.
But they don't have chess kind of cells: like A1, C7, etc.
My formulas in Excel look like this =SUM(A1:A800)and =(A1+B1*C1/D1).
iForels is one of the best productivity tools I've tried, but it's useless if simple formulas will not work.
Thank you for any help!
PS: I tried to copy formulas from Excel into my iForels application. I expect it will work in the same way as in Excel.
Hi 👋🏻 iForels "formula" feature supports JS syntax as well as Excel/Google Spreadsheet's predefined functions. Actualy, you almost answered your question. The iForels is a database and Excel is spreadsheet: just use column/feature name instead of code like a cell coordinate (A:1...).
Your =(A1+B1*C1/D1) formula would look like #A+#B*#C/#D. A, B, C, D - could be any name of the column/feature. For example #price+#qty.
You CAN modify the name of column any time, and formula would still work perfectly.
Another important nuance: because iForels is a database it automatically understands which row do you mean, and you don't have to specify the number of row, like A1, A2, etc.
You could also use functions like =SUM(A1, B1, F1). Just use correct database columns: SUM(#A,#B,#F). Also = symbol is not required in iForels.
If you need the "totals" for some specific columns just click on the bottom of the column and choose 'SUM'.
There are variety of precalculated totals, such as Average, Number of records, Standart Diviation and many more.
Be aware that totals are sensitive to the filters.
It calculates datasets which matches your filters request. If you'd like to see total sum for all records you have, just make sure there are no filters applied.
In case If you need filter from time to time, DONT delete it, just disable filter by clicking the icon near "term-condition" item.
iForels is much easier than Excel :)
Hope it helps!
I am attempting to build a industry standard pareto chart in MS Report Builder. The chart below is a generic example of what I want to see. The problem is that my categories are not ordered by the transaction_sum for that category, but by the name of the category. If I go to CategoryGroups Collection and specify that the sort expression be based on the transaction_amount field and click OK and run the report chart, it is ordered alphabetically on category. I go back into CategoryGroups Collection and the custom expression is gone and it has reverted to the category. I have found no solution to this issue.
So I thought I would go into the query for the dataset and add a new field ModCat consisting of a single character prepended to the category field i.e. 'ARent', 'BFood', CUtilities', 'DGym', 'ESmall_expense'. I use that as category in my chart and it sorts based one the transaction_sum! Excellent, but I still need to strip that ordering letter from the category labels. So I write a LabelsFormat expression for the vertical category axis that uses MID to remove that first letter. But when I run the report the 'ordering' letter is still there. If I just use the original category field for the LabelsFormat it just ignores it. Am I missing something here? Is it really that hard to create a simple pareto chart in Report Builder? Any inputs are much appreciated. Thank you
I'm trying to create a spill-range solution to turn a list of dates and multiple columns of names into a structured two columns of data. I can do this using VBA, but because this will be automated and web-based, I need a spill-range solution.
A sample file of my situation can be found in this file.
As you'll see below, I have a list of a set of employees ("slackers") who have requested vacation/PTO during December. I've created a list of two spill range formulas that are:
A Column listing all days December
A list of slackers requesting the day off (array going horizontal).
Part 2 presents the problem as the the number of slackers is inconsistent and I'm not sure how to create additional dates for each row. Thus my problem is how to structure a filter/Array formula to list each employee, by day.
In the following tab, you can see my desired outcome. I've used a macro to generate this, but because this is web-based, I cannot use it.
I've tried a variety of mixing and matching array formulas and filters but cannot find a way to populate the date with each name.
While my question is scoped to addressing this conversion from multi-column to 2-column approach, I am happy to hear comments addressing the overall concept.
Here it is with your datatable:
=LET(
end, PtoRequestsTable[End],
strt, PtoRequestsTable[Start],
us, PtoRequestsTable[Slacker],
usCnt, COUNTA(us),
lst, DATE(YEAR(TODAY()),12,1),
led, DATE(YEAR(TODAY()),12,31),
dtSq, INT(SEQUENCE((led-lst+1)*usCnt,,lst,1/usCnt)),
md, MOD(SEQUENCE((led-lst+1)*usCnt,,0),usCnt)+1,
ussl, IF((INDEX(end,md)>=dtSq)*(INDEX(strt,md)<=dtSq),INDEX(us,md),""),
SORT(FILTER(CHOOSE({1,2},dtSq,ussl),ussl<>""),1,-1)
)
It will automatically grow and shrink with the table. It also has the start and end dates as inputs.
You may need to adjust maxWidth if there are more than 8 potential slackers.
=LET(maxWidth,8,
days,ByDay!A2#,
slackerBox,OFFSET(days,,1,,maxWidth),
ndx,SEQUENCE(ROWS(days)*maxWidth),
ndxDay,INT(ndx-1)/maxWidth+1,
slackerList,INDEX(slackerBox,ndxDay,MOD(ndx-1,maxWidth)+1),
FILTER(CHOOSE({1,2},INDEX(days,ndxDay),slackerList),slackerList<>0))
I simply have a dataframe of "lat" and "lon" coordinates that I would like to visualize on a map.
I am trying to view my data data on the map. But nothing is being displayed.
In my case, the mmsi is the id.
Please note that I have around 2M points to display. Is that possible in databricks?
If there is no way around (plotting 2,000,000 points) in databricks, then what tool can handle large amount of data?
Any help is much appreciated!!
The built in map does not support latitude / longitude data points.
Delivering 2 million data points directly to a browser is problematic. Databricks has a protective limit of 20 MB for HTML display. Your viewers won't be able to take in and visually process that level of detail at any point in time.
I recommend implementing a filter/summarization strategy to enable the display within Databricks notebooks. Some ideas can be taken from this Databricks post: https://databricks.com/blog/2019/12/05/processing-geospatial-data-at-scale-with-databricks.html
Also this Anaconda post gives an excellent survey of data visualization packages, some (like Datashader, Vaex) implement a visual summarization strategies before rendering images: https://www.anaconda.com/blog/python-data-visualization-2018-why-so-many-libraries
The error message clearly says that " Unrecognizable values in the first column. The values should be either country codes in ISO 3166-1 alpha-3 format (e.g. "GBR") or US state abbreviations (e.g. "TX")."
Note: To plot a graph of the world, use country codes in ISO 3166-1 alpha-3 format as the key.
A Map Graph is a way to visualize your data on a map.
Plot Options... was used to configure the graph below.
Keys should contain the field with the location.
Series groupings is always ignored for World Map graphs.
Values should contain exactly one field with a numerical value.
Since there can multiple rows with the same location key, choose "Sum", "Avg", "Min", "Max", "COUNT" as the way to combine the values for a single key.
Different values are denoted by color on the map, and ranges are always spaced evenly.
Reference: Databricks - Charts and Graph
Hope this helps.
I have two data sets with exactly the same fields that I would like to combine into one dataset.
I cannot put a UNION/JOIN and make it return one dataset in the query as all data is encrypted and gets decrypted by an assembly reference loaded in SSRS (so I cannot run the necessary WHERE's unless I use a filter once the data is in SSRS).
I can return the second dataset using Lookup/LookupSet however I am using this data in a bar chart so (somehow) need both sets of data to display on it. If I was using a tablix I would be able to "hack" it by putting a second tablix without headers underneath the main tablix and show it like that. Unfortunately being a graph I cannot do this.
I also tried running it as one dataset, returning all values and then running "filters" based on category groups in the chart however for whatever reason [bug in SSRS?] the filter on these filters the whole result set, not just the one category group.
Is what I am trying to do possible in SSRS? Seems so basic but after a week of trying I have just about given up!
Merging two datasets is not possible but there may be a way to fake it for your chart purposes by doing a SUM of LookUpSet. What ever field is used as your value needs to be looked up using whatever criteria is being used for your axis.
Let's say you're displaying sales by month. Your value field is SUM(Fields!TotalSales.value) and your date field is Fields!month.value. You'd want to add the value from dataset1 and lookup the total from dataset2 - like:
=Fields!TotalSales.value + Code.SumLookup( LookupSet(Fields!month.Value, Fields!month.Value, Fields!TotalSales.value, "Dataset2") )
Unfortunately, SSRS doesn't let you sum a lookupset (so what's the point of it?), so you have to use custom code to do it.
Function SumLookup(ByVal items As Object()) As Decimal
If items Is Nothing Then
Return Nothing
End If
Dim suma As Decimal = New Decimal()
suma = 0
For Each item As Object In items
suma += Convert.ToDecimal(item)
Next
Return suma
End Function
Stolen from: How to combine aggregates within a group with aggregates across groups within SSRS
You're data is obviously different but the concept should be the same.