So I am only executing a program using proc sql to create a table with statistics on X.
After a while, the task bar says complete, but the table is never created and I have this error poping up.
Any idea where it can come from? I can run other programs just fine so it's specific to that one.
Thanks!
[img]https://i.imgur.com/SFswQlc.png[/img]
Well, I just figured it out if it helps anybody in the future.
For me, I was adding a new column with conditions like
SELECT*
,Case
WHEN calculated columnX like 'text1' OR
calculated columnX like 'text2' OR
calculated columnX like 'text3'
THEN result
END AS columnX
FROM TableA
but the column after the calculateds should have been columnW. Basically, it was auto-referencing. It didn't gave me an error in the log, and without a debugger, it was quite hard to find.
Hope it helps.
Related
I'm trying to see if I can write tests in C# that will validate the measures in a model; to do I need to execute the measure and compare the result with an implementation in C# that should be the same.
I've set up a basic Power BI-report containing a couple of tables and measures. One of the measures is a simple count('fact_data'[Item]), and works as expected when I'm looking at it in the report.
When connecting to the model via ADOMD.NET I'm able to extract the measure expression programmatically, but when I try to run it via the AdomdDataAdapter all I get is
AdomdErrorResponseException: Query (1, 18) The syntax for '[Item]' is incorrect. (COUNT('fact_data'[Item])).
Other and more basic queries where I simply return table contents work without problem.
No matter what I try I cannot get this to execute; if I rename the column or table to something that doesn't exist, I get an error about this so it would seem that the query is executed, but that something is either wrong or missing in the syntax.
I still don't know how to do this via ExecuteScalar(), but wrapping the DAX in a ROW() seems to work for stored measures.
I've been working in a practice PowerBI document and was able to get a measure to work, but now when I try to re-create the measure in the non-practice document, I get this error:
'The column 'Department Names[DESL]' either doesn't exist or doesn't have a relationship to any table available in the current context.'
The data and tables are exactly the same for both files.
I've compared the relationship in the model view and the relationship is the same.
Where else can I troubleshoot to figure out why the measure doesn't work? I feel like PowerBI did something automatically in my practice document that I need to implement.
Also, any great training suggestions would be swell.
I found a problem with my database connection, which would have been nice if PowerBI had told me directly, instead of only throwing an error when I tried to connect the 2 sources.
I'm not done fixing the problem yet, but suspect that once that connection is good, I'll be able to relate the 2 columns in the 2 tables.
I'm trying to create a custom visual in Power Bi using Python script. My data source is from my excel file and it load properly. But whenever I will type my script in the python script editor and execute it, it always giving me the same error of can't display this visual. Anyone who can help me resolve this?
Error Message
Script
I finally solved the same problem thanks to frustration. The working solution felt impossible to me as a python coder. I though I was supposed to modify the two automatically generated dataset related comment lines to code by deleting the \# from the beginning of those lines.
How my code looks like now and display works as expected:
\# dataset = pandas.DataFrame(.. ! keep this line as a comment !
dataset = dataset.drop_duplicates(.. \# this line you can run or leave as a comment
.. my code ..
This error happens mostly not only because of a connection to a python script but also connections to SQL connector or even just an update from Power Bi. Check the recent changes in Power BI every month to see if any affect your problem. Also, check your transformations and data types. You may be using text instead of the Whole Number for enumerations
When using R markdown for making statistical reports, I have the ability to echo the R code in my output document. I'm learning SAS and I was wondering if it was possible to highlight or echo the SAS code in my final ODS report ? I'm using a dirty hack right know to display the code in my document, which is using "ods text = ", but it seems quite redundant. Plus it doesn't add syntax highlighting.
That feature does not exist in the SAS language right now, but it has been mentioned in several talks by Amy Peters, principal product manager of the SAS programing environments, as a planned feature for a near-future SAS release (with no specific date yet, but hopefully in the next 2 years). It would likely be implemented in a similar fashion to Jupyter Notebooks, in that you write your code and get your output inline.
That said, SAS does support Jupyter Notebooks, which is the best current (third party) solution. Contact your SAS administrator for more information.
I have an idea here, I'm the type of guy who dosent take no for answer and find a way to fiddle and get it done... but i think this is abit far fetch... you can try still I think it will work with mostly evrything but may have a hard time to play with quotes when you have multiple semi colomns....
Check:
I started by creating a dumbass dataset :
data tata;
x=1;
run;
then we do the following:
%let code= select * from tata;
proc sql;
create table report as
&code.;
quit;
proc print data=report;
footnote "&code.";
run;
The rationale:
I think it you put your code in macrovariables and then execute those macro variables you would be able to print show the code after by printing the macrovariable following your text...
See the sample
Hopefully someone out there will have run into this before. I'm trying to use the street level geocoding capability of SAS' PROC GEOCODE, but I keep getting a cryptic error. I couldn't find anything on the net about it (although to be fair I only spent a half hour looking).
First, I'm using SAS Enterprise Guide (I've tried on both v4.2 and v4.3), although I still prefer to program as I find the point and click interface quite limiting. Maybe this right here is my problem?
Anyway I first get the lookup data sets from http://support.sas.com/rnd/datavisualization/mapsonline/html/geocode.html and follow the instructions in the readme. I also use the pre-written SAS program to import the CSV files. My input dataset contains just 4 variables: street address, city, state, and zip. I then run the following code:
libname josh 'C:\Users\Josh\Desktop\Geocode\SAS files';
proc geocode
method=street
data=SASUSER.Home_Policy_Address_Detail
lookupstreet=josh.USM
out=test;
run;
However I get this error:
ERROR: Variable NAMENC not found in JOSH.USM data set.
Nowhere in the readme or the import program is a variable named "NAMENC" ever mentioned. This is what has me stumped. Is it something wrong with the simple PROC GEOCODE program I wrote? Is it due to me using SAS EG (although I've yet to run into a base SAS procedure that hasn't worked on EG)? Or something else?
Any help/guidance would be much appreciated. Thanks in advance!
Check your SAS version. You can use the 'Help' menu in DMS mode or submit this statement:
%put &sysvlong;
It looks like you are using SAS 9.3 but your lookup data JOSH.USM is the lookup data formatted for SAS 9.4.
PROC GEOCODE street lookup data comes in two slightly different formats, one for SAS 9.3 and another for 9.4. When you download the nationwide lookup data from the SAS MapsOnline geocoding page, make sure to download the version appropriate for your SAS release.