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).

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

Ah yes, creating some new dimension, for example, called "IsDifferent" and having values of 0 or 1 would definitely work. If this dimension makes sense within your cube, then it would be OK to add (for performance and simplicity reasons). If the case presents itself where you have another two dimensions you need to compare, you will need to add "IsDifferent2". This pattern may repeat based on the use case.

It would be possible to create a PlugIn that takes dimension names as parameters, which would allow you to dynamically compare values without needing to pre-define all of your combinations.

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.

Some interesting things to note:

If you DO NOT put your custom class in the %DeepSee.Time package, it will not be visible through the Architect UI. Even if you do not include it in the %DeepSee.Time package, you will be able to modify your cube definition from Studio and specify your custom class. For example, I created the following class:

 

      Class User.CustomTime1 Extends %DeepSee.Time.AbstractLevel

 

This custom class IS NOT visible in the Architect's "Extract value with function" drop down. However, I created a level with the following timeFunction value in my cube class from Studio:

 

      timefunction="CustomTime1"

 

Manually entering this value will work and your custom time functions will be able to survive upgrades. If you do include your class in %DeepSee.Time, it will be listed in the Architect UI

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

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.

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>"
}