Peter Steiwer · Jan 30, 2020 go to post


<dataListBox  sql="select id from deepsee_study.doctor" onclick="alert('onclick');onchange="alert('onchange');ondblclick="alert('ondblclick');">
</dataListBox>

I tested this in the SAMPLES namespace on Cache for Windows (x86-64) 2018.1.2 (Build 309_5U) Wed Jun 12 2019 20:02:36 EDT. When clicking an item, I see the onchange alert. After double clicking the item I previously selected, I see the ondblclick alert.

Peter Steiwer · Jun 2, 2016 go to post

Hi David,

By default, this happens when items are in a hierarchy. For example, if you have Product Category and Product Name as filters and you filter on the Pasta Category, only the Product Names in the Pasta Category will be available to select from. If two levels are not in the same hierarchy but you would like the same behavior, you can use the "Depends On" property of a level. This property can be found on the Architect Management Portal Page in the right side pane after clicking on a level. After setting this property and compiling, a Build will need to be done. This is because using the "Depends On" property will create a new index to quickly determine which members should be displayed when using a filter control.

After this behavior is understood, you may wish to add hidden filters to your widget with default values. For example, I could set Pasta as my Default Value for my hidden Product Category filter. When I try and select a value from my Product Name filter, I only get my different Pasta names as options.

Peter Steiwer · Jul 14, 2016 go to post

Currently, there is a workaround to accomplish this desired behavior without needing this parameter to be implemented. You can add a "listing" filter to your KPI (implemented on a widget) and then inside of %OnGetListingSQL, you can assign different SQL based on the filter value.

XData:

<filter name="Listing" valueList="listing1,listing2"/>

%OnGetListingSQL:

if $get(pFilters("Listing"))="listing1" {
set tSQL="SELECT <column list 1> from <table>"
else {
set tSQL="SELECT <column list 2> from <table>"
}

Peter Steiwer · Oct 14, 2016 go to post

This documentation page has some "recipes" for creating calculated measures. What you requested is slightly more advanced than what is described here, and the two provided solutions are complete and precise. But I believe this section of the documentation provides some good recipes for building a calculated measure that does exactly what you need.

Peter Steiwer · Nov 7, 2016 go to post

Hi Ryan,

In reference to the  Troubleshooting Guide -> Build Problems -> Errors During Build -> Check ^DeepSee.BuildErrors/ run ##class(%DeepSee.Utils).%PrintBuildErrors(pCube) are two options for this case. To check ^DeepSee.BuildErrors, you can either use the Management Portal's Global Explorer page or you can use terminal. This global will be populated with the error messages that are caused as well as the ID of the record that caused this error. Using ##class(%DeepSee.Utils).%PrintBuildErrors(pCube) will also show the same error messages in a more user-friendly way.

Here is an Error that I forced:

SAMPLES>d ##class(%DeepSee.Utils).%PrintBuildErrors("HoleFoods")
    1   Source ID: 2
        ERROR #5002: Cache error: <VALUE OUT OF RANGE>%UpdateFacts+107^HoleFoods.Cube.Fact.1
 
1 build error(s) for 'HoleFoods'

From this output I can see that ID 2 had a Value Out Of Range error on %UpdateFacts+107^HoleFoods.Cube.Fact.1 line of code. At this point I can look into this line of code and figure out why it is out of range. My line of code reads as

 Set %var("Mx3501588378B") = $S(%source("%ID")=2:$ZD(99282828),%source("UnitsSold")="":"",%source("UnitsSold")>5:1,1:0)

We can see that the expression I wrote will cause an error when Source ID 2 is built. In a more realistic situation, it may be harder to determine why this line of code caused the error. This line of code is either generated by DeepSee or it is a user defined source expression. As always, if you are not sure how to determine the cause of the error past retrieving the error message, the DeepSee support team is available 24/7. But accessing this error message is always a helpful first step

Peter Steiwer · Nov 21, 2016 go to post

Hi Benjamin,

In DeepSee, Null data is handled differently than 0. This being the case, you can use the ISNULL function (Documentation). Each of these three members can be placed in ISNULL() as the first parameter and 0 as the second. If there is no data, instead of being Null, it will be treated as 0 and your calculation should work.

Peter Steiwer · Nov 23, 2016 go to post

Hi Benjamin,

In DeepSee, you can create custom widgets called "Portlets" (Documentation). Portlets will allow you to write HTML or ObjectScript that will generate the contents of a widget. This can include things like simple text, embedded web pages, and even third party chart libraries.

Peter Steiwer · Nov 30, 2016 go to post

It looks like this error is happening when a key that does not exist is passed into the PlugIn through %CONTEXT. Would it be possible to only pass in Keys for members that exist? This seems to work without errors

Peter Steiwer · Dec 5, 2016 go to post

Hi Derrek,

These requests are not possible to do "out of the box", but as Evgeny points out, using alternate methods such as accessing DeepSee results from the REST API, you can render your own graphs and dashboards with any 3rd party library that allows this level of customization.

We also have a couple samples that show DeepSee results being displayed in a basic HTML page, links to these samples can be found in the Documentation.

Peter Steiwer · Dec 7, 2016 go to post

Hi Bahram,

Within Studio there are a couple ways to determine what code a macro is running

1). You can right click a macro and select "goto" (or F12) - this will take you to the definition

2). You can hover your mouse over the macro and it should show the code in a tooltip

3). You can look at the .int code to see what the macro was compiled into

Peter Steiwer · Dec 7, 2016 go to post

You can definitely write a PlugIn to evaluate the two values and exclude any records from your returned count that are equal. Off the top of my head, I can not think of anything that will do this automatically or easily from MDX functions

Peter Steiwer · Mar 7, 2017 go to post

Samuel is correct, using NOW-1 on a Day level will give you the information from yesterday.

For the second part, please see the following two queries:

>>select PERIODSTODATE([DateOfSale].[Actual].[MonthSold],[DateOfSale].[Actual].[DaySold].[NOW]) on 1 from HOLEFOODS
 
 
1 Mar 1 2017                              *
2 Mar 2 2017                              *
3 Mar 3 2017                              *
4 Mar 4 2017                              *
5 Mar 5 2017                              *
6 Mar 6 2017                              *
7 Mar 7 2017                              *
---------------------------------------------------------------------------
Elapsed time:       .009242s
>>select COUNT(PERIODSTODATE([DateOfSale].[Actual].[MonthSold],[DateOfSale].[Actual].[DaySold].[NOW])) on 1 from HOLEFOODS
 
 
COUNT                                     7
---------------------------------------------------------------------------
Elapsed time:       .006043s

Peter Steiwer · Mar 7, 2017 go to post

Have you tried creating a "Searchable Measure"? This may partially solve your problem. Checking the "Searchable" option in Architect for a measure will make the measure available within a Named Filter. It will also allow you to create a filter control on a widget with the measure.

This is not available for calculated measures because creating a "Searchable" measure creates a special index on that measure (this index is populated at build/synchronize time).

Peter Steiwer · Mar 7, 2017 go to post

Hi Derrek,

I generally recommend using the "All Member". This will allow the proper aggregation function from the measure to be applied to your total. This may cause your % of Total to not display the desired results and you may be required to create a new measure to display the % of Total instead of using the column summary option. The summary options will base their results on the data inside of the table, not on the data behind the table. In some basic cases, they summary options will give the desired results, but in more complicated queries, they will not.

Peter Steiwer · Mar 13, 2017 go to post

Unfortunately, from what I can tell, it does not seem like we parse the TARGET setting. This means that if you want to apply the setting to multiple Widgets, you will need to create multiple SETTINGS parameters

basic_dashboard_url&SETTINGS=...;&SETTINGS=...;&SETTINGS=...;...;

This being said, if you want the setting applied to ALL widgets, removing TARGET will apply the setting to all widgets. You can also set TARGET=* to apply to all widgets as well.

Peter Steiwer · Mar 16, 2017 go to post

Hi Derrek,

I suggest taking a look at the IIF Documentation. I think this is what you are looking for. Here is an example:

>> WITH MEMBER [Measures].[TestIIF] As 'IIF((([Measures].[Amount Sold]>500) AND ([Measures].[Amount Sold]<3000)),[Measures].[Amount Sold],"")' SELECT {[Measures].[Amount Sold],[Measures].[TestIIF]} on 0,NON EMPTY [Product].[P1].[Product Category].Members ON 1 FROM [HOLEFOODS]
 
                             Revenue              TestIIF
1 Candy                       $162.49                    *
2 Cereal                      $402.61                    *
3 Dairy                       $105.95                    *
4 Fruit                       $977.62               977.62
5 Pasta                     $1,408.68             1,408.68
6 Seafood                     $238.70                    *
7 Snack                     $4,195.20                    *
8 Vegetable                   $552.95               552.95

Peter Steiwer · Apr 18, 2017 go to post

Documentation says that if you use Target=* on your print PDF control, you can "print your dashboard". This option will simply create one PDF that contains each of your widgets printed as they would normally print. So if you are looking for 1 PDF, this may be the option for you. If you want to save an exact copy of what you see on your dashboard, as Alessandro points out, the browser Print option may be best.

I am not sure if you have already explored this or if you had a print control on each widget previously.

Peter Steiwer · May 5, 2017 go to post

Hi Arutunyan,

Let me know if this properly answers your question. If it does not, please consider adding an example.

We can use the property FullName as an example. Some values for this may be "Gevorg,Arutunyan" or "Steiwer,Peter". You can make a dimension with a source expression using $piece to extract the Last name or the First name. In this case, you may want a single dimension with 2 levels. The first level is "Last Name" that uses the expression: $piece(%source.FullName,",",1). The second level can be called "FirstName" and it can use the expression: $piece(%source.FullName,",",2).

Peter Steiwer · May 25, 2017 go to post

DeepSee has a pretty good Developer Tutorial in the Documentation. This is a very good place to start. There are also the "HoleFoods" and "Patients" cubes in the SAMPLES namespace that you can take a look at and play around with to see some of the basic features of DeepSee

Peter Steiwer · Jul 14, 2017 go to post

In MDX, you need to include "on AXIS" where AXIS can be 0,1,2,rows,columns. I think it would be rare to find this text in an SQL query.

Is calling %DeepSee.ResultSet.%PrepareMDX() and checking the status an option? If this succeeds, you are ready to Execute and if it does not, then you can proceed with SQL.

Peter Steiwer · Sep 8, 2017 go to post

I believe this is because you need to add a connection string to tell the terminal which instance to connect to. Please see this documentation for information on how to connect to a local instance or a remote instance

Peter Steiwer · Jan 17, 2018 go to post

Unfortunately, it does not look like this is implemented. I would suggest opening a new WRC so that your request can be logged and so you can track the status of this enhancement request

Peter Steiwer · Feb 6, 2018 go to post

Would querying against %Dictionary.CompiledClass and adding a where clause on SqlSchemaName do what you need?

Peter Steiwer · Mar 9, 2018 go to post

You can accomplish this by using pivot variables. By using this approach, the pivot variable can act as the Key for two different date dimensions. Example:

Pivot variable with value of &[2017].

[Date1].[H1].[Year].$variable.Year

[Date2].[H1].[Year].$variable.Year

On your dashboard, you would want to use the Apply Pivot Variable control instead of the Apply Filter control. 

Peter Steiwer · Mar 31, 2018 go to post

If you use the custom listing in Analyzer and view the MDX that it generates, it will look something like this:

DRILLTHROUGH SELECT FROM [HOLEFOODS] RETURN Outlet->City "City",Comment "Comment"

You should be able to construct this however you want, assuming the return fields exist in your source (or fact table if you are using DRILLFACTS)

Peter Steiwer · Jun 29, 2018 go to post

DeepSee does not have anything built in to automate this behavior. Depending on how the relationship is defined, this could cause significant overhead (also if more than 1 relationship is defined, this grows even more). The recommended way of doing this is exactly as you have done.

An alternative approach is to implement %OnProcessFact and have it process any related cubes that need to be updated. The good thing about this approach is that it saves you time during your main application while saving records, but the downside is that it also requires CubeB to be synchronized at the same rate as CubeA.

Using the Cube Manager, you would be able to write some "pre-synchronize code" that would run queries to find records in CubeA that need to be updated and calling ##class(%DeepSee.Utils).%SetDSTimeIndex() here. This is quite similar to what it sounds like you are doing now, but this lets you avoid using triggers and building this process into the Synchronize itself.

Peter Steiwer · Jul 16, 2018 go to post

Hi Damian,

I believe there are a few cases where this can happen - most of them involving the use of source control. Do you have source control enabled on all of your namespaces except ENSDEMO?

I would suggest opening a new WRC for this issue since there are a few possible causes and we may need to know a little bit more about your system.

Peter Steiwer · Jul 16, 2018 go to post

To automate this with built-in DeepSee methods, please see documentation for %ExportPDFToFile. This can be used in a task and can be saved/emailed on a scheduled interval. Using other utility methods such as %GetMDXFromPivot can allow you to supply a list of pivot names and programmatically get the MDX to supply into the Export method.