How to sort the bar chart considering the category in Google Data Studio? - bar-chart

I have been trying to change the order of the bar chart, so that the values for "Positiva" would appear first, then followed by "Negativa" and "Não sei". After reading some information on Google Data Studio forum, I saw that I should create a formula and then add it to the sort option. But it still didn't work.
The image below shows my bar chart. The category in green should come at first, followed by red and gray. I don't want to change the colors, I want to change the order.
So, after reading the forum, I created this formula and added to sort option, but I got an error. How can I solve it? And is there a way to centralize the percentage?

It can be achieved by using the Calculated Field below as the Secondary Sort, and setting the Order to Descending:
AVG(CASE
WHEN REGEXP_MATCH(answer, "(?i)(Positiva)") THEN 3
WHEN REGEXP_MATCH(answer, "(?i)(Negativa)") THEN 2
WHEN REGEXP_MATCH(answer, "(?i)(Não sei)") THEN 1
ELSE 0 END)
Google Data Studio Report and a GIF to elaborate:

Related

Duplicate bar chart from Excell into an SSRS report

I'm having a very rough time trying to group this SSRS chart correctly. It's easy as pie in Excel. So I'm wondering what I need to do in SSRS to duplicate it.
There are no hard errors to report other than the data is not being displayed the way I want it to be displayed.
One image shows the Chart Data I am passing into the chart, the other shows the visual appearance.
The final image is taken from Excell and shows what I am trying to do inside SSRS. The Excel chart displays it just about perfectly to what I am looking for.
The next two images are from excell. One displays just about perfectly how I am trying to get it to look on SSRS. The other one is how I am passing the data into SSRS.
Any idea how I need to group the data within the SSRS chart to display it the way I am looking for?
i don't think you can create the exact copy of that graph, but
try making the graph larger (taller) and also change vertical axis interval to 1
(right click on vertical axis go into properties>> axis options >> interval 1)
you can get something like this

Interactive Sorting in a paginated row group Tablix with Chart

I have simplified my problem as follows:
A tablix with 2 columns dataset: Code (a, b, c, ...), and Value (random < 100).
Make a paginating group of 5 rows from the detail, steps here.
Add an additional row inside the group, merge all columns, put rectangle to hold a Chart pointing to the same dataset. This is Chart1.
Add another row outside the group, to hold another copy of the exact Chart above. This is to later help the interactive sorting to work on the details beyond the boundary of the groups. This is Chart2. The final design will appear like this:
Create an interactive sorting for the column Code following this:
The final work shall look like this, where you can navigate the pages, while also have the 'sliding window' effect for viewing the chart, that is: Page 1 is a-e, Page 2 is f-j, etc.. Note that the interactive sort is also honored.
For simplicity, please download my RDL here.
Now, my problem: I have to make Chart1 to be on top of the Tablix1.
Doing so will make the column header of Tablix1 to be sandwiched between the Chart1 and the details. This will make the Interactive Sort to behave incorrectly, that each page have its own state of Interactive Sorting. How to solve this? Modified RDL here.
This link solves the question by doing a self referencing Drill Trough by the click of a cell or image. The Action will pass the parameter to toggle between Ascending and Descending sorting order of the Tablix.
Combining the above the solution with this other link, we can keep the number of tablix stays to one, regardless of the number of columns to sort.
Get the final RDL here.

SSRS Line Chart: Adding an Average/Target line to Line Chart

I'm sure I'm missing something obvious but it has so far eluded me.
My current report:
I have a dataset of employees' absences at my company.
It is essentially broken down by department, date and time lost.
I have charted this as below:
The manager is shown their own departments dynamically using a filter on the series group.
By using a report level filter I can cache the dataset overnight for all departments.
My preferred report:
In order to give some context to the data I would really like to add another line showing the same data for the whole organisation.
This data is already captured and I can add that "department" for all users so they get a graph as below (new line in blue with square markers):
The trouble is that I want the extra line to appear completely differently to the existing lines
I don't want the extra line to have markers necessarily
I don't want the extra line to appear in the same legend
I don't want the extra line to have an action (i.e. be clickable)
In my perfect world, there wouldn't even be a line, just a change in background colour above and below where the line would be. I haven't been able to find a pretty example of what I am talking about so instead I have produced this hideous travesty in ms paint:
Any help gratefully received!
Can change all of that information/treatment by modifying the series.
Firstly change the Chart Type of the series to Area
Which gives you something like....
All other settings you mention can be done in the series properties
eg
Right Click Series, Select Properties, Legend, Check the box marked
[Do not show this series in the legend]
Set the Action (in series properties) to None
Set the markers as you want
I have achieved partial success using the StripLines property for the Y Axis:
Screenshot of setting:
I added a Member then changed the BackgroundColor and StripWidth.
The StripWidth determines the height of the shaded area and can be an expression.

Creating a Directory Listing type Report in SSRS

I was wondering if there was a way to create a directory listing report in ssrs and if so, how would i go about creating it.
I'm mostly familiar with creating tabular and some somewhat complex reports, but nothing like this; so any help would be extremely useful.
Here's a sample of how the report might look.
Thanks!
Addendum: The content on each page needs to be grouped by Department & Sub-Department.
I made a mistake on the sample report; where it says Department Subtitle it should say sub-department.
Here's one way I've seen it done.
For a 3 column look, create 3 tables/list with the same dataset and set visibility for details group to:
=IIF(ROWNUMBER("YourDataSet") mod 3=1,FALSE,TRUE) <--Table1
=IIF(ROWNUMBER("YourDataSet") mod 3=2,FALSE,TRUE) <--Table2
=IIF(ROWNUMBER("YourDataSet") mod 3=0,FALSE,TRUE) <--Table3
I think your problem is an addition to this question here.
I did a simple test that imitates your situation. Here is how to do it:
Set the report to 3 columns via Report properties. Adjusted the width of each column so that they fit in 1 page of paper.
Add a List control to the first column. Put Text Box controls inside with the required data fields. The List control will repeat for each Listing record.
Create groups for Department and Sub-Department via Row Groups pane. Rearrange the groups so that they will appear above the List control.
Right-click on Department group (or Sub-Department group) and add Page Breaks.
Preview (Should get a result pretty close to what you want)

How to add moving average to Report Builder 2.0 chart

This is driving me nuts. I've looked at all the relevant MSDN tutorials but they talk about 'data field drop zones' and how a 'Add Calculated Series' menu option should be there but it's not, and no screenshot is provided to show what a 'data field drop zone' is. This is the menu I get when I "right-click on a field in the data field drop zone":
The frustrating thing is I know I've seen this calculated series stuff before, but I can't find it again, it's not in the 'Series Properties' dialog that I can see, and I can't find a tutorial showing how to find this feature. I'm guessing you can only have a calculated series on certain chart types, or I don't have some flag turned on or something, but I didn't see that mentioned anywhere.
Can you tell me how I can add a line showing the median of my data to a chart in Report Builder 2.0? I think I can do this by adding a 'Moving Average' via a 'Calculated Series', but I can't find how to add that.
Edit: on a different chart, the 'Add Calculated Series' menu option was available. It was a stacked column chart and the series I right-clicked on was an expression that used RunningValue.
I had to remove the series group (from the 'data field drop zone' on the right side of the chart) so that all I had was 1) a category group (bottom of the chart) and 2) a data series (top of the chart). Then I could right-click on the data series at the top of the chart and 'Add Calculated Series' was a menu option.
I solved it by making the groups as individual series and then a combined series that i set to hidden. I was then able to make the calculated series from the hidden series.