Xamarin component creation & reusability - xaml

I am learning Xamarin and wanting to display the following in a page:
Time Period
DEALS
AMOUNT
SalesTeam
sum
sum
SalesRegion
sum
sum
SalesRegion
sum
sum
SalesRegion
sum
sum
SalesRegion
sum
sum
..
..
..
..
TOTALS
HOUSE TOTAL
sum
sum
F2F TOTAL
sum
sum
ZOOM TOTAL
sum
sum
So one header at the top where the Time Period will be bound to a property, two static headers DEALS & AMOUNT.
There are 3 SalesTeams in the results and the values in this row will be the sum of the SalesRegion results for each team that I will bind to, so I would have 3 * SalesTeam & Region "tables" then the Totals "table".
These all are formatted the same so I get the feeling there must be a way of "templating" each "row" for adding dynamically rather than copy & pasting the grid layout and then if new sales team is brought in copy and paste again? Is there a correct way for me to create this layout and also it be useable in a few different pages in my Xamarin mobil app?

Related

Merge row cells after Summing up multiple rows by grouping in ssrs

I have a matrix report in SSRS which is grouped by Product Class, Tax Type and Depot Name as shown in the following image.
What I am trying to achieve is to get the sum of both the Order Volume and Marker Volume based on the tax type grouping and populate them respectively in the order volume total and marker volume total fields.
So I put the following queries for them respectively:
=Sum(Fields!OrderVolume.Value, "TaxType")
=Sum(Fields!MarkerVolume.Value, "TaxType")
I then got the total as expected but it's splitting. How can I merge both of them (order volume total and marker volume total) based on the Tax Type?
Kindly help,
Best Regards

SSRS Group Subtotal and Total

I'm trying to get the subtotal for WO Total Cost but where that WO Number appears multiple time in the Division group I don't want to add them together. I only want the cost for WO Total to appear once in the report for each division. As it is now the work order number 40321 has a WO Total Cost of $362.24 and because it appears for each laborer it is added in the total represented in the green total line. Can anyone tell me how to prevent summing WO Total Cost where the WO Number appears more than once in a Division group?
Thanks for the reply Alan. Here is a screenshot of the design view in Report Builder. So, what I'd like to see is a summing of only the WO Total cost once for each report for each WO Number. The WO Total cost represents all costs (Equipment, Labor, and Material) for a given work order. So, at it stands now, the report is summing work order 40321 three times and giving us an incorrect total.
I've grouped the report by Division so we can see costs for a particular division for a given time period. I've also grouped the report by Person Labor so we can see how much a particular laborer is costing us for a given period of time.
What I don't know is how to do is prevent the report from summing the WO Total cost where the WO Number appears multiple times in the results for a given division.
I'm not sure you will be able to do this directly in the report design without some convoluted custom code. Other people maybe will have more inspiration but I can't see how to do it. You cannot even look for unique values to sum as it's possible that 2 WO numbers could have the same cost.
Without knowing what your dataset/database tables look like I can't offer much more but here are some approaches I might consider if I was doing this, both mean doing the work in SQL.
**Option 1 **
I would consider calculating this in your query in a new column which should be fairly simple. Each row would end up with the total amount for the AssetGroup. So, if you had 20 records for AssetGroup A and 10 records for AssetGroup B than all the 'A' records would have the same 'AssetGroupTotalWOAmount' value and all the 'B' records would have the same 'AssetGroupTotalWOAmount' value.
Then in your report you can simply use =FIRST(Fields!AssetGroupTotalWOAmount.Value) to get the correct number. This will get the first value within the scope of the expression, so your case within the ASSETGROUP row group.
**Option 2 **
Create a separate dataset with just the amounts you need, with a single record per AssetGroup . So probably just two columns, AssetGroup and AssetGroupTotalWOAmount
In the report you could then use a LOOKUP to get the correct value.

DAX % of total count if measure qualifies criteria

DAX 2013 standalone power pivot.
I have a sales table with Product and Brand columns, and Sales measure which explicitly sums up sales column.
Task in hand: I need to create 1 measure RANK which would ...
if Product is filtered expressly, then return count of Products that have higher or equal sales amount, divided by total count of products.
If it's a subtotal brand level, show the same but for brands.
My current approach is using RANK and then MAXX of rank which seems working but a no-go - slow nightmare. Excel runs out of memory.
Research: it's been a week. This is the most relevant post i found anywhere, this question here , but it's in MDX.
In my example picture, I'm showing Excel formulas with which I can get to the result. Ideally there shouldn't be any helpers, 1 formula for all.
I.E.
RANK:=IF( HASONEFILTER(PRODUCTS[PRODUCT], HELPER_PROD, HELPER_BRAND)
where HELPER_PROD part would be something like this - need to find a way to refer to "current" result in pivot table like Excel does using [#[...:
HELPER_PROD:=COUNTX(ALL(PRODUCTS), [SALES]>=[#[SALES]]) / COUNTX(ALL(PRODUCTS))
HELPER_BRAND:=COUNTX(
DISTINCT(ALL(PRODUCTS[BRAND])),
[SALES]>=[#[SALES]]) /
COUNT(DISTINCT(ALL(PRODUCTS[BRAND]))
You can use the "Earlier" function to compare with the current record.
ProductsWithHigherSales:=CALCULATE(countrows(sales),
FILTER(all(Sales),
countrows(filter(Sales,Sales[Sales]<=EARLIER(Sales[Sales])))
))
Using Earlier function in measures: can-earlier-be-used-in-dax-measures
Used workbook: Excel File

How to calculate new value for field in Access

I've got a few problems with a database I have created.
I want to calculate a Total Price (Sandwich Quantity multiplied by Sandwich Price). I had it working before, but I had to delete Sandwich Price from the OrderDetailsT table of which it was originally in. I'm now having issues with this calculation, as I cannot make a calculation in the OrderDetailsT table (Sandwich Price isn't there).
How can I apply the Discount to the Total Price if the Total Price is more than $50 for instance? After the Discount has been applied to the Total Price field, I would also like to store it in the NewPriceAfterDiscount field.
Here is an image detailing my situation:
You have multiple questions in one:
But, first of all. As the image shows, why do you have a left join between OrderDetails an Sandwich? In a order calculation you don't need not ordered sandwiches.
To total price calculation:
Add a new column to the query grid (assuming discount is a percentaje stored has a number between 0 and 1):
[SandwichT].[SandwichPrice] * [OrderDetailT].[SandwichQuantity] * [OrderDetailT].[Discount]
To store total price: you can use the above formula, but using a update query.
If you plan to show the prices in a form or in a report:
you can do de calculations on the fly (and don't store the total
price)
or you should update the total price un one query and then build another
query as datasource of the form/report.
another posibility (my recomendation) is to store the total in the input form

After executing a SQL statement, i get a column of data. How can I get a total of that data?

I am running a query to retrieve a list of invoices that have not been approved yet. This query is generating daily alerts via email. The email contains an HTML table of the client name, inv #, sub-total, adjustments, final total. I want to be able to list a summary before the table of the total sub-total, total adjustments, and total final total of the entire table.
ex:
Total Sub-total: 10
Total Adj: -8
Total Billed: 2
Sub-Total Adj Total
7 -6 1
3 -2 1
I tried SUM(sub-total), but it only retrieves the first sub total ("7" in this example) instead of adding them all up. Help?
The query I am using is:
SELECT dbo.CurInv.subtotal AS "subtotal", dbo.CurInv.CIAdj AS "Adj",
dbo.CurInv.CIAdj+dbo.CurInv.subtotal+dbo.CurInv.CISTax AS "TotalInvoice",
SUM(dbo.CurInv.CIAdj) AS "Total Write Up(Down)"
FROM dbo.Clients, dbo.CurInv
I ended up just creating a new table that calculated the totals for each row and then added that table to the query.
You can used the UNION operator. You need to define a column to designate the individual vs total data.
SELECT
dbo.CurInv.subtotal AS "subtotal",
dbo.CurInv.CIAdj AS "Adj",
dbo.CurInv.CIAdj+dbo.CurInv.subtotal+dbo.CurInv.CISTax AS "TotalInvoice",
SUM(dbo.CurInv.CIAdj) AS "Total Write Up(Down)"
FROM
dbo.Clients, dbo.CurInv
UNION
SELECT
SUM(dbo.CurInv.subtotal) AS "subtotal",
SUM(dbo.CurInv.CIAdj)AS "Adj",
SUM(dbo.CurInv.CIAdj+dbo.CurInv.subtotal+dbo.CurInv.CISTax) AS "TotalInvoice",
SUM(dbo.CurInv.CIAdj) AS "Total Write Up(Down)"
FROM
dbo.Clients, dbo.CurInv