The dimension '[Time]' was not found in the cube when the string [Time].[Year], was parsed - ssas-2012

[Time].[Year] attribute's defaultMember property is set to
tail(FILTER( [Date].[Year].members,
not ISEMPTY( [Date].currentmember )), 1).item(0)
When I try to browse the cube, I am getting an error:
DefaultMember(Date,Year) (1,14) The dimension '[Time]' was not found in the cube when the string [Time].[Year], was parsed

That's an odd message considering the expression that you show has the Date dimension and not the Time dimension specified. If that's truly the case, here's what I would do to track down the problem. Find the solution folder in the file system, open the project folder, and then open the bin folder. You should have a file with an ASDATABASE file extension. If you don't see file extensions, but see a column for type, open the one with the Analysis Services Database Deployment Contents type. Open it with Notepad or your favorite text or XML editor. Search the file for [Time].[Year] and then work your way backwards through the nodes to figure out which property of which dimension it belongs to. Then you can go into SSDT and fix the problem.

Related

POI XSSF - Can't add pictures to existing xlsx file

At this line:
wbk.addPicture(iconData, Workbook.PICTURE_TYPE_PNG);
I get this exception:
org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException: A part with the name '/xl/media/image2.png' already exists : Packages shall not contain equivalent part names and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]
That same line of code has worked perfectly before. If I open the xlsx file with 7zip, there is actually a image named image2.png, which is correct and is another picture added by hand with Excel. It's like it tries to add the new image with the same name as the existing image. What am I doing wrong?
I was editing a file that was saved with LibreOffice 6.1, after opening it in Excel and saving it, it worked.
Also, like #Gagravarr said, a upgrade will be better and will probably work without needing to use Excel only

Power BI unable to read excel worksheet with multiple tabs

I have an excel worksheet with 10 tabs.
For each tab, the data is structured as follows:
All tabs follow this same basic structure.
In Power BI, when I go to "Get Data", and then choose the .xlsx file, I get the following error:
Unable to connect
We encountered an error while trying to connect.
Details: "The input couldn't be recognized as a valid Excel document."
This is very frustrating and I don't know how such a simple task cannot be accomplished in Power BI.
Thank you.
Such alert could appear when you try to use Power BI connector on Excel file. It's understandable if the source file is corrupted and can't be opened in Excel. However, it looks strange if Excel opens the file in question and shows nothing wrong.
Based on our experience above is usually means what something is wrong with XML scheme of the Excel workbook.
Mushup trace (Data->New Query->Query Options->Diagnostics->Enable tracing) could give some additional information, but often not enough to find the reason.
We had two main scenarios
XML scheme is not complete
Usually if Excel file was generated by third-party tool. Such tool could generate quite limited XML scheme which is enough to open the file in Excel and to work with it, but not enough for Power BI connector. As an example, trace log shows
[DataFormat.Error] The input couldn't be recognized as a valid Excel document.\r\nStackTrace:\n…
…
[DataFormat.Error] We couldn't find a part named '/xl/sharedStrings.xml' in the Excel package.\r\nStackTrace:\n…
Such case is easy to fix – it's enough to open the file in Excel and save it (without any changes) – Excel is clever enough to fix the scheme. For the routine regular tasks we use poweshell script which does exactly the same in background.
There is the link within Excel file which is not recognizable as valid
Usually if Excel file is synced/kept with some cloud storage. One of the variants, wrong link could appear with copy/paste from another such file. That could be active link in one of the cells; or the link within conditional formatting formula; or even the link which actually isn't used by Excel but kept somewhere inside the scheme. For example, in one of the files I found in Data->Consolidate->All references the link like
'\drive.tresorit.com#7235\Tresors….[file.xlsx]Sheet'!$AC$6:$AC$357
on the file which was deleted long ago and isn't used, but for some strange reason the link was kept within the scheme.
Unfortunately for such case trace log doesn't give enough information to localize the issue, it looks like
[DataFormat.Error] The input couldn't be recognized as a valid Excel document.\r\nStackTrace:\n…
…
nExceptionType: System.UriFormatException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\r\nMessage: Invalid URI: The hostname could not be parsed.\r\nStackTrace:\n
Perhaps I have not enough knowledge for more straight forward localization of the problem, but the only way is to exclude Excel file parts one by one and check if the issue disappeared. Another way could be to unzip Excel file and check if wookbook.xml or sheetNN.xml have something suspicious inside.

Installshield Basic MSI project : Display logo dynamically from a folder which is not part of the installation

I am new to Installshield and I want to display the banners displayed in the dialogs during installation to be fetched dynamically from an external folder which resides in the path of the setup.exe (not part of the installation) using Installshield Basic MSI project.
I tried specifying the “File Name” for the banner bitmaps in the dialog as <SETUPEXEDIR>\MyLogo\Test.bmp. But this gives an error as “File not found. Error streaming file to binary table.” when the project is built.
Is there a way possible to achieve this?
Windows Installer requires that the images are baked into the .msi file in order to display them (it saves the bits, not the name, in the Binary table), so it's very reasonable to summarize this as not supported.
As a possible workaround (one I'm uncertain whether it can work), it's feasible that a custom action could write temporary records to the Binary table or Control table that containing the image found at run time. Note that this sort of custom action is somewhere between admitting failure and a semi-custom action. Furthermore finding the image, dealing with incorrect image sizes, determining which dialog boxes need the added image Binary or Control record, and possibly deleting an existing Binary or Control record, are left as exercises for an eager reader.

Pkzip - CRC-32 in Central directory file header

i am searching the internet to find what Fields are calculating by crc-32 of the Central directory file header as mentiond here
wiki-zip
as you can see there are some calculation but i don't know what fields are entered to this calculation, the main reason i want to do this is because i want to enter some data to the comment field and still that a docx file(=pkzip) could be open on office 2007+ without the message of corrupted file, i am pretty sure after long research is that it has something to do with the CRC-32 Calculation.
if there are any other ideas i be glad to hear them
EDIT
i now try to hide more info at the extra feild and get that the file is coruptted althought i added the size to the footer
If you are simply inserting a comment in the central directory, then the problem has nothing to do with the CRC. You are messing up the size of central directory in the end of central directory field.

How to get the filename for an attachment if there already is another one with the same filename, instead of getting a random name?

In cases when two attachments with the same filename are attached to a Notes Document, the second file is renamed internally to something like ATTXXXX. Even if the first filename is deleted and document re-saved, the internal filename remains cryptic.
There doesn't seem to be any way to retrieve the original Filename through back-end functions. I have looked high and low in LS but also in the C++ API, and could find nothing. It seems to be a trick that can only be done in the front-end. I am not sure where the information in the file icon graphic is stored, and whether it is accessible. In simple cases it would be possible to do a rename, I suppose (i.e. there is a single attachment and a single file icon graphic).
Could anybody confirm that this is, indeed a limitation of Notes or is there a cool way to solve this?
This is causing me some headaches whilst processing a large number of documents. My customer has trouble believing that there are some things that can only be done in the front end.
You should be able to get the original filename, even with duplicates.
It is not when the file is attached that the name is changed, it is when you detatch it.
You are probably using the .Name property, try the .Source property of the EmbeddedObject, that should return the original filename.
From the help:
If the NotesEmbeddedObject is an embedded object or object link, this property returns the internal name that Notes uses to refer to the source document.
If the NotesEmbeddedObject is a file attachment, this property returns the file name of the original file.
Syntax
To get: source$ = notesEmbeddedObject.Source
It's in the CD records for the rich text -- you will see it if you use NotesPeek to examine the contents of the rich text item. But I don't think it's accessible through the NotesRichText navigator class, so I'm pretty sure you would have to go the C API and parse through the CD records. Or, the MIDAS Rich Text API can probably get it, but that's third party software. I.e., not free.

Resources