How to Calculate only distinct values in rdlc report - visual-studio

Hey I want to sum only distinct values in rdlc report but I was failed every time. Give some good tips to complete this task.
I have a rdlc report and Values return like this
Given Wt Retained Given% Discount Net Payment
23.86 10.225 70 1406 68911
6.007 2.575 70 177 17528
23.86 10.225 70 1406 68911
6.007 2.575 70 177 17528
I want to sum only distinct value that is 23.86+6.007=29.867 but I got when I use =SUM(Cdec(Fields!Given_wt.Value)) i.e 59.734
Please give some useful tips

Related

Calculate with filter but ignore existing filters

I have DAX measure that looks as follows:
61 to 90 Days = CALCULATE(Sum(AccountsPayableDocument[DocumentBalance]), AgingBucket2[BucketId] = 4).
I want this measure to ignore any existing filters in place set by a slicer and just use the filter specified. I know this can be done, and I've seen it done before on videos, but can't, at the moment, remember out how.
That's what the ALL function is for. It removes any filters on the table or column specified inside the parentheses.
61 to 90 Days =
CALCULATE(
SUM(AccountsPayableDocument[DocumentBalance]),
ALL(AccountsPayableDocument),
AgingBucket2[BucketId] = 4
)

Calculating variance using kibana

Want to calculate variance for a time series data of multiple restaurants with number of customers visting every day.
date name numCustomers
1-Sep-2016 restaurant1 40
2-Sep-2016 restaurant1 30
3-Sep-2016 restaurant1 35
--------------------------
1-Sep-2016 restaurant2 20
2-Sep-2016 restaurant2 24
--------------------------
1-Sep-2016 restaurant3 50
3-Sep-2016 restaurant3 45
For a each week, want to find variance in number of customers visiting each restaurant.
i.e. want to first bucketize the data per week. Then sum numCustomers for each restaurant and find variance on calculated sum. For above example need to find variance for [ restaurant1(40+30+35), restaurant2(20+24), restaurant3(50+45) ]
Looked at this but not sure how this can be utilized here.

data.gov.in : limit parameter not working

I am trying the following
https://data.gov.in/api/datastore/resource.json/?resource_id=e16c75b6-7ee6-4ade-8e1f-2cd3043ff4c9&api-key=APIKEY&limit=200
I still get only 100 records. If I change the limit to 50 it gives me 50 records. How do I get the records from 101 - 200 and beyond?
I also tried using the offset parameter like so :
&offset=50
expecting it to give me record number 50-150, but it doesn't.
Does anyone have an Idea?
Try this query from OGD Platform.
you will find total_records = 2947 and count=100.
Here, you have total of 2947 records and maximum of 100 records can be fetched in one query. If you want next 200 result, set offset=2 which will give results from 201 to 300 and so on. You need to increase your offset by 1 in each query till 2947/100 = 29 (29th query will give 47 records) to get all data.
Parameter limit is used to fetch total number of records in each query and that will be between 0 to 100 (max). That's why when you set limit=50, you got 50 records but if you set limit=110, still you will get 100 records only.
Hope I my answer is clear enough. Good luck.

Spotfire: Using one selection as a range for another datatable

I've searched quite a bit for this and can't find a good solution anywhere to what seems to me like a normal problem for this product.
I've got a data table (in memory) that is from a rollup table(call it 'Ranges'). Basically like so:
id | name | f1 | f2 | totals
0 | Channel1 | 450 | 680 | 51
1 | Channel2 | 890 | 990 | 220
...and so on
Which creates a bar chart with Name on the X and Totals on the Y.
I have another table that is an external link to a large (500M+ rows) table. That table (call it 'Actuals') has a column ('Fc') that can fit inside the F1 and F2 values of Ranges.
I need a way for Spotfire Analyst (v7.x) to use the selection of the the bar chart for Ranges to trigger this select statement:
SELECT * FROM Actuals WHERE Actuals.Fc between [Ranges].[F1] AND [Ranges].[F2]
But there aren't any relationships (Foreign keys) between the two data sources, one is in memory (Ranges) and the other is dynamic loaded.
TLDR: How do I use the selected rows from one visualization as a filter expression for another visualization's data?
My choice for the workaround:
Add a button which says 'Load Selected Data'
This will run the following code, which will store the values of F1 and F2 in a Document Property, which you can then use to filter your Dynamically Loaded table and trigger a refresh (either with the refresh code or by setting it to load automatically).
rowIndexSet=Document.ActiveMarkingSelectionReference.GetSelection(Document.Data.Tables["IL_Ranges"]).AsIndexSet()
if rowIndexSet.IsEmpty != True:
Document.Properties["udF1"] = Document.Data.Tables["IL_Ranges"].Columns["F1"].RowValues.GetFormattedValue(rowIndexSet.First)
Document.Properties["udF2"] = Document.Data.Tables["IL_Ranges"].Columns["F2"].RowValues.GetFormattedValue(rowIndexSet.First)
if Document.Data.Tables.Contains("IL_Actuals")==True:
myTable=Document.Data.Tables["IL_Actuals"]
if myTable.IsRefreshable and myTable.NeedsRefresh:
myTable.Refresh()
This is currently operating on the assumption that you will not allow your user to view multiple ranges at a time, and simply shows the first one selected.
If you DO want to allow them to view multiple ranges, you can run a cursor through your IL_Ranges table to either get the Min and Max for each value, and limit the Actuals between the min and max, or you can create a string that will essentially say 'Fc between 450 and 680 or Fc between 890 and 990', pass that through to a stored procedure as a string, which will execute the quasi-dynamic statement, and grab the resulting dataset.

Stimulsoft Report Showing the same Color for all columns

I Setup a condition in Stimulsoft - Cross Tabbed table to have the cell back-color display "Green" if it's value is Greater than a Number. I added another condition to have the cell back-color display as "Red" if it's value is less than a number.
The report generated, displays all cells as Green.
How can I get the report to display the correct back-color based on the condition?
I'm using Stimulsoft 2014.1.1900
Here is my output:
Store_Number Net_Sales
19 *37060.5700*
43 *65500.1400*
13 *51757.6800*
32 *120306.5400*
15 *57593.2100*
19 *53917.7200*
26 *78487.1700*
90 *105606.6100*
14 *118246.8800*
55 *79873.8300*
Total 768350.3500
In Italic is the column that is showing up ALL green. The numbers above 55000 should show up "green" below should show up "red"
The conditions in CrossTab are set different way.
You should use value variable. For example,
value <20
You could get more information in the Stimulsoft User Manual.

Resources