Grouping fields in Google Data Studio - google-data-studio

In Google Data Studio, I am trying to group different stages and assign them to a group for viewing in a sales funnel. The data are all strings. What I'm confused about is the fact that this data works just 1 or 2 weeks ago and the graph is already there. However, when I try to change the grouping, it shows the error "Invalid formula" or "Failed to create field. Please try again later"
I have also tried to clone this code to create another field and it doesn't work at all. Have anyone encountered this problem and found a solution?
Here is the associated code:
CASE
WHEN Stage IN ("Interested", "Good Lead", "Good Leads") THEN "Prospected"
WHEN Stage IN ("Attempted 1st", "Attempted 2nd") THEN "Attempted"
WHEN Stage IN ("Contacted", "Lukewarm Lead", "Warm Lead", "Cold Lead", "Qualified Lead") THEN "Contacted"
WHEN Stage IN ("Course Chosen") THEN "Docs Collection"
WHEN Stage IN ("Document Collected", "School Applied") THEN "School Applied"
WHEN Stage IN ("Paid") THEN "Paid"
WHEN Stage IN ("Visa Applied") THEN "Visa Application"
WHEN Stage IN ("Finished") THEN "Won"
ELSE "0"
END

Created a Google Data Studio Report (Google Sheets Embedded) to try out the CASE statement, and it works as expected.
Is the data structured as displayed in the Report and Visual below?
What's the Data Source (e.g. Google Sheets)?
Have you tried Refreshing the Data Source?
What browser are you on (e.g. Chrome)?
In addition to reloading the page (F5), you could try a Hard Reload (Ctrl + F5);
If the formula was created at the Data Source-level, you could try whether it works when creating it at the Chart-level (as shown in the visual below).

Related

Word Online (Business) Connector - Populate a Microsoft Word template - how to get values for queries key; drive and file

When a Locic app (in Populate a Microsoft Word template) is adding a Document Library and a File at design time the values are transformed in the code behind view to this below
"queries": {
"drive": "b!pQtOjN9hhkuS3cqytiRbkgLNffrN86lAv6qypCvoFZHH47f9pgvOQbSdIQgHA6Er",
"file": "01COWZ3YIURGJHT27EDVCJJBJNMGO3QJZ4",
"source": "https://XXXX.sharepoint.com/sites/XXXXXX/"
}
Hov Can I get those values at runtime?
Here I provide my code view as an example:
In my code view, if I want to get the value of "dirve", "file" and "source", I can use the expression below:
drive:
actions('Populate_a_Microsoft_Word_template').inputs.queries.drive
file:
actions('Populate_a_Microsoft_Word_template').inputs.queries.file
source:
actions('Populate_a_Microsoft_Word_template').inputs.queries.source
Set the expression in your next action(such as "Initialize variable" action)
Then you can get those values and use them.

viewcriteria is not working for data having word "and"

i am working with applying view criteria programaticlly, till now it was fine, but when i searched with "develop and unit test" it is showing 0 records even though my table having data. iam using like operator. could any one help on this .
i have one table, having option to filter by providing select combo box list of vales, for every column when i select any thing in lov in value change listener i am applying viewcriteria programatically on table vo.
note. every thing is programatic view object only there is no point of entity, or sql
Sample Code:
DCIteratorBinding bindIterator = ADFUtils.findIterator("Tri2EWS_ETKAPIData_VO1Iterator");//Table viewObject(programatic)
Tri2EWS_ETKAPIData_VOImpl voimpl = (Tri2EWS_ETKAPIData_VOImpl) bindIterator.getViewObject();
ViewCriteria viewCriteria = voimpl.createViewCriteria();
viewCriteria.setName("MyVc");
ViewCriteriaRow viewCriteriaRow = viewCriteria.createViewCriteriaRow();
viewCriteriaRow.setOperator("ViewAttr1", "LIKE");
viewCriteriaRow.setAttribute("ViewAttr1", "stack and OverFlow");
viewCriteria.add(viewCriteriaRow);
viewCriteria.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
voimpl.applyViewCriteria(viewCriteria, true);
voimpl.executeQuery();
voipmpl.getRowCount();//Getting 0 here (Actually i should get 1)
Turn on debug messages for ADF BC (jbo.debugoutput) so you can see the SQL that is being generated.
This will help you figure out if the query is correctly formatted.

Upload Alexa Slot Types via API

Is there anyway of uploading Custom Slot Types values via an API, so that you do not need to type them in manually using the new Alexa Skill Builder interface (if you have many of them):
I haven't found anything.
My recommendation is to get the model via SMAPI first, edit the json file with your new values and update it via SMAPI again.
ask api get-model -s "enter your skill id here" --stage development -l en-US > model.json
in the model.json file you can see the slots definition. Change it (with a script or manually) and update the model again
Reference to both commands:
https://developer.amazon.com/docs/smapi/ask-cli-command-reference.html#update-model-subcommand
https://developer.amazon.com/docs/smapi/ask-cli-command-reference.html#update-model-subcommand
It seems not (after searching). There is a feature request logged here with Amazon:
https://forums.developer.amazon.com/questions/9640/api-to-upload-intent-schema-and-sample-utterances.html#answer-77902
Yes you can do this via the SMAPI API/CLI. Take a look at https://developer.amazon.com/docs/smapi/ask-cli-intro.html for a full detail - it allows for full model editing via JSON.
In the left bar bellow the "Intents" and "Slot" is the option "JSON Editor". There you can write a JSON for the new intents you want to add.
Example without slot type
{
"name":"YesIntent",
"samples":[
"Yes",
"Yeah",
"I do",
"I am"
]
}
Example with slot type
{
"name":"NumberIntent",
"slots":[
{
"name":"number",
"type":"AMAZON.NUMBER"
}
],
"samples":[
"{number} is my number",
"{number}",
"my number is {number}"
]
}
As other answers suggest, you can use the SMAPI.
Alternatively, you can select the "code editor" tab on the left and drag/drop or copy/paste your schema json code.
https://github.com/williamwdu/Alexa-Custom-Slot-Generator
I wrote this to convert csv/excel to JSON format so you can paste it into code editor.
Let me know if you have any question.
There is no README for the code coz I have no time these days

SSRS report definition is newer than Server

I created some reports in Visual Studio 2015 with all the latest updates. However, when I try to deploy the reports I get this message:
The definition of this report is not valid or supported by this version of Reporting Services.
11:40:28 Error
The report definition may have been created with a later version of Reporting Services, or contain content that is not
11:40:28 Error
well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target
11:40:28 Error
namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded.
The first lines of the .rdl file are set up like this:
<?xml version="1.0" encoding="utf-8"?>
<Report MustUnderstand="df"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
xmlns:df="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily">
Can I change the schema definition? If so, to what? I tried just changing 2016 to 2014 or 2012, but neither worked.
Is there a place I can go to see valid definitions?
I actually ran into a similar problem where a change I needed to make resulted in an "Undocumented Error/Invalid RDL Structure" error in 2016, so I edited the RDL file so I could open it in an earlier version and make my changes. Not too hard, but you need to make a couple of tag edits.
For new reports you should probably just use an older version, but for existing reports you can do this: (I reverted to 2008)
Change the Report tag:
Remove MustUnderstand="df"
Change the xmlns value to "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
Delete the xmlns:df attribute.
Delete the entire "ReportParametersLayout" block.
Delete the "df" tag and its content.
Delete the "ReportSections" and "ReportSection" opening and closing tags (not the content).
Actually wrote some superhackish code to do this as part of a blog post, but the manual edit is simple enough.
The settings below should be set to your sepecific version of SSRS, and then take the RDL from the \bin directory
Or, after updating the TargetServerVersion, simply use right click | deploy from the rdl.
The accepted answer is significantly more difficult/prone to error/unlikely to work across multiple versions of ssrs, and needs to be applied each time you change the rdl.
I had the same issue when switching to VS2017 and installed Report Designer Version 14.2.
For me only 3 steps needed to fix the issue.
1: Set Change the xmlns to "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
2: Remove ReportSections" and "ReportSection" (Only Tags).
3: Remove report ReportParametersLayout section.
The only thing you need to memorize is to point xmlns to 2008/01
Other 2 steps can be seen in the error message after you change to 2008/01 and try to run the report.
If you are having trouble in a Visual Studo 2017 C# desktop application with LocalReport (RDLC), please see this answer:
https://stackoverflow.com/a/45149488/6732525
I recently ran into this issue as well. I found that I only needed to change two items in the .rdl file in question.
Change FROM:
Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
TO:
Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
Unlike other responses, I needed 2010 instead of 2008. I would check an .rdl file that you have already deployed.
Remove the "ReportParametersLayout" block.
Note: If I removed ReportSections block, it did not work as others have noted.
I ran in to same problem and this is how I solved it,
Set the "TargetServerVersion" property on report project properties to be your old version of reporting server.
Build the project.
Get the report in the bin folder and deploy to the old reporting server.
Your source reports format and namespace will be updated to latest version. But bin folder reports will be build to be compatible with targeted reporting server version.
I have automated this task.
create a form with a textbox named "TextBoxFile" and a button.
In the code of the click button:
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(TextBoxFile.Text)
Dim root = xmlDoc.DocumentElement
For Each elel As XmlNode In root.ChildNodes
Debug.WriteLine(elel.Name & " " & elel.NodeType)
Next
If root.Attributes()("xmlns").Value <> "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" Then
root.Attributes()("xmlns").Value = "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
End If
Dim nsmgr = New XmlNamespaceManager(xmlDoc.NameTable)
nsmgr.AddNamespace("bk", "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition")
Dim autoRefreshElements = root.GetElementsByTagName("AutoRefresh")
While autoRefreshElements.Count > 0
root.RemoveChild(autoRefreshElements(0))
End While
Dim ReportParametersLayout = root.GetElementsByTagName("ReportParametersLayout")
While ReportParametersLayout.Count > 0
root.RemoveChild(ReportParametersLayout(0))
End While
Dim ReportSections = root.GetElementsByTagName("ReportSections")
If ReportSections.Count > 0 Then
' Move content of ReportSections just below the block.
Dim ReportSection = ReportSections(0).ChildNodes()
' First, copy the elements after
Dim precedent = ReportSections(0)
For Each child As XmlNode In ReportSection(0).ChildNodes
Dim clone = child.Clone
root.InsertAfter(clone, precedent)
precedent = clone
Next
' After deleting the existing block
While ReportSections.Count > 0
root.RemoveChild(ReportSections(0))
End While
End If
xmlDoc.Save(TextBoxFile.Text)
MsgBox("Ok")
The most simple and straight forward solution. I would suggest you to find Microsoft.ReportingServices.ReportViewerControl.WebForms in Manage NuGet Packages of the current project and update this dll version to latest version.
Navigate from VS menu: Tools > NuGet Package Manager > Manage NuGet Packages for Solution
Login through the local admin account and correct computer objects by deleting and creating those computer objects.

Importing Vanilla Forum to SQL Server

I'm trying to get the data from a Vanilla Forums export into SQL Server so I can then write some sort of script to import it into YAF.NET. I've tried with an integration services project and the SQL Server import wizard. The forums and users went over eventually but the topics table is giving me trouble. The problem is the separation of records, I can't get them to split properly with a flat file data source.
Eg:
DiscussionID,CategoryID,InsertUserID,UpdateUserID,Name,Body,Format,CountComments,CountViews,Closed,Announce,Sink,DateInserted,DateUpdated,InsertIPAddress,UpdateIPAddress,DateLastComment,Score
1,2,2,0,"Welcome","","Html",1,1,0,0,0,"2005-11-22 20:36:00","2005-11-22 20:36:00",\N,\N,"2005-11-22 20:36:00",\N
13,5,5,0,"Custom Feilds","Hi Echilon\,\
\
I've been fiddling with iZeit Calendar a bit (though I haven't published anything\, as that would be inapropriate without your permission) and I have tried\, without success\, to add extra fields to both the input form and the calendar output.\
\
So far I've added the extra columns to the database\, attempted to edit the multiple queries in functions.php -> addevent() function with little success.\
\
I was wondering if you could help me out a bit in better understanding the flow of data from input fields to database query.\
\
Once I get the data into the database\, I shouldn't see any future problems of displaying it.\
\
I would also like to note that you've done a fantastic job with this software!\
\
-Ax","Html",4,1830,0,0,0,"2006-02-23 00:14:43","2006-02-24 18:57:53",\N,\N,"2006-02-24 18:57:53",\N
3,4,2,0,"[Wallpaper] Aeon Genesis","<a target=\"_blank\" href=\"http://www.deviantart.com/deviation/24402244/\"></a><img src=\"http://mi6.nu/aeon_small.jpg\" border=\"0\" />\
<a target=\"_blank\" href=\"http://www.deviantart.com/deviation/24402244/\">Full Size - 1600x1200</a>\
\
I made this in 2004\, it's an edited photo of the view from my window at sunset.","Html",1,1052,0,0,0,"2005-11-23 09:46:29","2005-11-23 09:46:29",\N,\N,"2005-11-23 09:46:29",\N
4,7,2,0,"Moodsig","This is a script which lets you pick a mood from a control panel\, then have it display that mood in a sig\, along with a random quote from a database. It's not quite finished yet\, but it should be released sometime this week. I just have to track down the guys who made the smileys for permission. It's a bit buggy at the minute\, but it should be working in a few days.\
\
At the minute\, you need PHP and a MySQL database\, but I might release a version which only needs php and a text file if there's demand for it.\
\
This is the control panel\, which controls the sig I'm using now.\
<a target=\"_blank\" href=\"http://mi6.nu/moodsig_0.8.jpg\"></a><img src=\"http://mi6.nu/moodsig_0.8_thumb.jpg\" border=\"0\" />","Html",1,1100,0,0,0,"2005-11-23 15:38:56","2005-11-23 15:38:56",\N,\N,"2005-11-23 15:38:56",\N
5,4,2,0,"Dynasig 1.0","Dynasig lets you set your current mood with a web based control panel\, then display it aswell as a random quote in a signature which you can use on a forum.\
\
<b>Installation</b>\
You'll need a webserver with PHP and MySQL. In the future\, I might release a version that doesn't need MySQL\, but for now\, you have to have it. \
\
1) Set up a database on ...
In this instance, new records start at these lines:
3,4,2,0,"[Wallpaper] Aeon Genesis","<a ta
4,7,2,0,"Moodsig","
5,4,2,0,"Dynasig 1.0","Dynasig l
How would I get this into SQL server?
If you're solely dealing with specific delimiters (such as a comma), you can use the BULK INSERT task (see: http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/).
BULK
INSERT ForumTable
FROM 'c:\ForumFlatFile.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO
If you want to import certain tags and statements (I can't tell from the OP, sorry), I would suggest functions. For instance, depending on how the forum posts are exported, build functions that could parse certain values between tags (for instance, a function that would parse out A HREF tags). Sometimes forum posts can lead and end with certain patterns, and a function could "recognize" these beginning and ending tags and grab the in between values.

Resources