I have a bar chart that it works fine, but the chart use just one series for all bars and all bars have same color. What should I do for creating different series for each records of my query?
This is my query:
select customeTable.firstname||' '||customeTable.lastname as fullName, customeTable.sumHour as sumHour
from (
select sum(projActivity.ACTIVITY_HOUR) as sumHour, users.FIRST_NAME as firstname, users.LAST_NAME as lastname
from SITA_PROJECT_TASKS_ACTIVITY projActivity
inner join SITA_PROJECT_TASKS projTask on projTask.ID=projActivity.TASK_ID and projTask.PROJECT_ID=:P39_PROJECT_ID
inner join SITA_USERS users on users.ID=projActivity.CREATOR_ID
where
(:P39_FROM_DATE is null or projActivity.ACTIVITY_DATE>=:P39_FROM_DATE)
and (:P39_TO_DATE is null or projActivity.ACTIVITY_DATE<=:P39_TO_DATE)
group by users.FIRST_NAME,users.LAST_NAME
) customeTable
If you have a column in your query that can be used to derive the name of the series, you can set that column as the name of the series. Demo application can be seen here.
You'd do exactly what you said: add another series. How? Right-click the chart region name and select "Create series":
Every series can have its own query, or they can share the region's source - it depends on you. Fill other required properties and you should have several series on the same chart.
Related
I want to take responses to Likert survey items and create a summary table of the counts of each response (text labels: strongly disagree, disagree, neutral, agree, strongly agree).
(sample data set & manually created desired results table available in this sheet)
I am only able to do one question at a time with QUERY.
=QUERY(likertTable,"select B,count(B) group by B",1)
Creating an array of QUERY functions does not always work when one option is not selected for a question, resulting in mismatched row size.
Is there a way to create the desired table with a single QUERY—or other (e.g., VLOOKUP, COUNTIF)—formula?
Try this, based on the order of criteria F3:F7
=query(arrayformula(split(flatten(B2:D2&"~"&vlookup(B3:D,{$F$3:$F$7,row($F$3:$F$7)},2,0)),"~")),
"select count(Col2) where Col2 is not null group by Col2 pivot Col1")
try:
=ARRAYFORMULA(QUERY(SPLIT(FLATTEN(IF(B3:D="",,B2:D2&"×"&B3:D)), "×"),
"select Col2,count(Col2) where Col2 is not null group by Col2 pivot Col1"))
to sort, add "sort column" manually and pass through another QUERY:
=QUERY({ARRAYFORMULA(QUERY(SPLIT(FLATTEN(IF(B3:D="",,B2:D2&"×"&B3:D)), "×"),
"select Col2,count(Col2) where Col2 is not null group by Col2 pivot Col1")),
{"sort";4;2;3;5;1}},
"select Col1,Col2,Col3,Col4 order by Col5",1)
I want to put the date on the X (Horizontal-Axis).
Simple count of sales by day.
Current chart:
I see how to turn off the legend. Might also be good to make bars the same color. But I don't see what else to do to get the date. I did try the labels tab, and put in an expression "=Fields!WebOrderDate.Value", but that didn't change anything.
Here are my current settings:
My SQL:
select CONVERT(date, WebOrderDateTime) as WebOrderDate,
Count(*) as Count
from VendorTrackingViewRpt
where PONum is not null and WebOrderDateTime is not null
group by CONVERT(date, WebOrderDateTime)
order by CONVERT(date, WebOrderDateTime)
I don't have SSRS available to me right now, but I think you should put the WebOrderDateTime under Category Groups instead of Series Groups.
i want to crete a page that will show top n entity , but the difficulty is that
the page have to work along three different filters , and each filters have data from differnt columns of an excel sheet.
Example - i have to show top n (any number ) employee name with salary on the basis of age , gender , work exp in a vertical bar view.
we have filter on age, work ex ,gender and also the filter should work in a hierarchy manner as well as individaully .It should give top n salary (emp name ) female employee if we select only gender filter . after that if we select age 20 then it should give top n salary of employee who are female and age is 20 . data should change accordingly on selection of filters.
You can set up a visual level filter for the data visualization (e.g. table).
For example, filter on the key showing the top 10 salary only.
Then, you can set the three different filters you want on the page and the data in the visualization will change accordingly.
Without filter selected:
With filter selected:
For a SSRS report, I'm trying to return a list of sorted data from a dimension to use with a parameter.
My dimension is [Radio].[Radio NO].[Radio NO] where the last Radio NO is a string.
I can find examples of returning one column while sorting on another but I can't figure out how to sort and return just one column.
Thanks whytheq! Based on your answer, here's what I came up with that works:
SELECT {} ON COLUMNS,
ORDER(
[Radio].[Radio NO].[Radio NO].MEMBERS
,[Radio].[Radio NO].CURRENTMEMBER.MEMBER_CAPTION
,BASC
) On ROWS
FROM [OurCube]
Without seeing the exact structure of your cube / query an avenue you could explore, if you'd like to order alphabetical, is the following
ORDER(
[Radio].[Radio NO].[Radio NO].MEMBERS
,[Radio].[Radio NO].CURRENTMEMBER.MEMBER_CAPTION
,BDESC
)
If you want to order by a measure in your cube, then something like the following:
ORDER(
[Radio].[Radio NO].[Radio NO].MEMBERS
,[Measures].[Profit]
,BDESC
)
This is a possible if you really need to change the column name before hitting SSRS but it has the disadvantage of changing it to a measure:
WITH
MEMBER [Measures].[thisIsTheNewName] AS
[Radio].[Radio NO].CURRENTMEMBER.MEMBER_CAPTION
SELECT
{[Measures].[thisIsTheNewName]} ON COLUMNS,
ORDER(
[Radio].[Radio NO].[Radio NO].MEMBERS
,[Radio].[Radio NO].CURRENTMEMBER.MEMBER_CAPTION
,BASC
) On ROWS
FROM [OurCube];
This is the code I used in my dataset. The result is as shown in the image.
The plan is to display the YEAR without month, day or time. Is this feasible?
SELECT t.Name AS Territoryname,
p.LastName AS SalesPerson,
c.CardType AS PayType,
s.OrderDate,
s.TotalDue
FROM Sales s
JOIN Person p
ON s.SalesPersonID=p.BusinessEntityID
JOIN CreditCard c
ON c.CreditCardID=s.CreditCardID
JOIN Territoryt
ON t.TerritoryID=s.TerritoryID
There are a number of ways to achieve this. The easiest, is to calculate a year value directly in your dataset, and then use this field in your chart. This is a simple matter of adding the following code to the select part of your dataset:
select
...
s.OrderDate,
YEAR(s.OrderDate) AS [OrderYear], -- This is the new field
s.TotalDue
from
...
Alternatively, you can create an expression that does the same thing, either as a calculated field in your dataset, or directly in the chart as the category field.