I am beginner at Power BI and I'm trying to group my data by "Opp title" and count the number of rows of dates:
The result will be :
Step 1. Select the table visual where your data is located in the Report Pane.
Step 2. In the Visualizations Pane, right click on the date Value in the Values area (not Filters area) and select Date instead of Date Hierarchy.
Step 3. In the Visualization Pane, right click on the date Value (same place) and instead of Don't Summarize select Count.
Select Advance editor on table and Select table -> Transfrom Tab -> select table and Group by option -> In Group by Select Advanced -> Select columns and mention the new column name -> give Ok button.
Related
I'm fairly new to tableau and I'm having the following issue. Below is a sample of the data I'm using.
Count | Item
___________________
1 A
3 B
2 C
3 D
5 E
2 F
5 G
9 H
I'm trying to group some of these together so I can show a stacked bar chart of these groups like the following:
Count | Item
___________________
6 A-C
10 D-F
14 G-H
How to do this?
Use Tableau's built-in Create Group feature
View and download the solution workbook on Tableau Public:
https://public.tableau.com/profile/fosstin#!/vizhome/HowtoGroupYourDatainTableau/Dashboard-HowtoGroupYourData
Right-click the Item dimension and choose Create > Group. This will open the Create Group dialog window.
At the top of the window, in the Field Name text field, enter a name for your grouped dimension or use the default title provided by Tableau, which is Item (group)
Select the first set of letters you wish to group, then click the Group button. Multiselect rows by holding down the control key or the shift key.
Type in a name for the group(i.e. A-C) and press enter.
Repeat steps 5 and 6 to create the D-F and G-H groups, then click OK.
Drag the Item (group) dimension to the Rows shelf and the Count measure to Text in the Marks card.
Add a column header to the Count column by double-clicking Measure Values in the data pane.
Right-click the Measure Values pill now on the Marks card and choose Format. Then, in the formatting pane, choose Numbers > Number (Standard)
References:
Tableau Help: Group Your Data
https://help.tableau.com/current/pro/desktop/en-us/sortgroup_groups_creating.htm#create-a-group-from-a-field-in-the-data-pane
Tableau.com Blog: The one-click trick for create headers for single-measure tables
https://www.tableau.com/about/blog/2015/11/how-create-fast-headers-single-measure-tables-45945
You can use a CASE statement to create the groups. I named it group in my example.
CASE [Item]
WHEN 'A' THEN 'A-C'
WHEN 'B' THEN 'A-C'
WHEN 'C' THEN 'A-C'
WHEN 'D' THEN 'D-F'
WHEN 'E' THEN 'D-F'
WHEN 'F' THEN 'D-F'
WHEN 'G' THEN 'G-H'
WHEN 'H' THEN 'G-H'
END
Then add group to your Rows shelf and Count to your text.
I want sum of only unique values in SSRS report.Is there any logic to achieve this.
this is what something like this sum(distinct value)
Thanks
Supposed you have a column named value in your query, you could do the following:
Add an additional column to the query of the dataset:
ROW_NUMBER() OVER (PARTITION BY [value] ORDER BY [value]) AS valueNr
Then, if you already have created a Sum field in the table, change the expression of the textbox to
=Sum(Iif(Fields!valueNr.Value=1, Fields!value.Value, 0))
Repeat this for every "distinct sum" calculation.
Yes. You use groups. At the top click the insert menu, then table, then Table Wizard. Pick your dataset and hit next. Now drag the column for the different types of items you want a distinct sum of into the Row Groups section. Drag your count column into the Values section. This should automatically turn it into Sum(ColumnName). You can click the down arrow to change the aggregate type (if desired). Press next and next and finish. Viola. You have a distinct sum for each specified field.
I would like to calculate the average of calculated rank for each competitor variable. I have trouble finding a solution as calculated rank is aggregated value. Can anyone help me with this?
It is the 2015_06 packaged file, and see "sheet 7".
https://drive.google.com/open?id=0B1PGq-fzDlKcWi03emxrQm1wdWs
I had a look at your workbook.
You need to do a change to your calculated field but then you can do it fairly easily with the table calculations.
Change the field Prem Rank to Rank(sum([Premium]),'asc')
Right click on it in the Marks section and make sure that "Compute Using" is set to "Table (Down)"
Create a calculated field with WINDOW_AVG([Prem Rank]) (I called it WINDOW_AVG([Prem Rank])).
Drop it into the column shelf
Right click on AVG(rank) -> Edit Table Calculation -> choose "Compute using: Advanced"
Change the settings according to this picture:
Right click on AVG(rank) again and choose "Discrete"
The result will be a table like this:
I think that is what you are after?
I am trying to sum all the column value and want to display a summary. I am choosing Insert -> Summary -> Column name and Sum.. But rather then showing sum it is counting the rows and displaying the rows. Kindly please suggest some solution. I am available here if some one need for more info to help please comment. (Sap Scn Crystal Report)
Are you sure you are selecting the sum option from the summary?, because normally this should have returned the sum of the values. As an alternative you can use a Running Total Field.
From the Field Explorer window, right click on the "Running Total Fields" and select "New".
In the window that will appear, on the left side you will see the available tables and fields. From there select the field that you want to sum up and press the top ">" button.
As a type of summary select "sum", type a name for the "Running Total Name:" and press OK.
Drag and drop the new Running Total Field on a section of your report.
I have these two fields in a dataset. How can I concatenate these in Crystal Reports to display next to each other?
select
CAST(T.GLTR_PSTNG_TYPE AS VARCHAR) REF_NO,
CAST(T.GLTR_DOC_CODE AS VARCHAR) GLTR_OUR_DOC_NO
from dom
You will need to create a FORMULA to concatenate these strings.
In the Field Explorer , right click the Formula Fields and select New.
It will prompt you for a Formula Name. Enter the name of your choice, and hit enter.
In the Formula Workshop screen select the 2 fields you require to concat from the Datasource, drag them down to the edit section. The formula should look something like this
{YourDataSource.Field1} & " " & {YourDataSource.Field2}
Click Save and Close.
Now you can drag the Formula Field onto the report to view.