I was having trouble with some dimension based calculated members defined in Analyzer. They would work and then not work. At one point I had two identical calculated measures, same code, same specification and one would work and one would not. I was trying to set them up in "shared storage", that checkbox in the calculated member dialog that should allow the measures to be used across multiple pivots.
In addition to charts on a dashboard we have a request to have a crosstab which would be populated by some entries queried out of an error log. It's basically a detail query with mostly text data. I have tried making a pivot widget for this using both a cube and kpi source, and while succeeding with the KPI, it leaves a lot to be desired.
Firstly, the cube is a no go. As far as I can tell the MDX subsystem in IRIS does not handle empty cells efficiently like other MDX systems such as Oracle's and Microsoft's.
How do we return a member from a set? For example if I want a calculated measure to return the NAME of the date with the max transactions, to get the set ordered I might do something like:
ORDER([TransactionDate].[YearMonthDate].[Date].MEMBERS, [Measures].[TransactionCount], DESC)
But how do I access the first member in the set as a member so that I can get to the properties such as the member NAME (what I want to return in this case)?
In some MDX implementations like Microsoft there are kind of backdoor functions for this like:
ORDER([TransactionDate].[YearMonthDate].[Date].MEMBERS, [Measures].
Since I'm just starting to use this aspect of IRIS I can't tell if this is a bug or some kind of nuance. If I run a single column query like this, I get results:
.png)
However if I try to retrieve using a DISTINCT or GROUP BY, I get no results:
.png)
And again except with a GROUP BY, with no results:
.png)
If I add in some other columns I still get no results HOWEVER, if I add in a date column, I now get results:
.png)
What am I missing here? Is this by design and if so, what governs whether a return set is returned or not? I did purge my query cache in case something was happening there but it did not fix this.
Is it supported to be able to use member functions to define a set, in particular a set defined with a member range in the form:
set = member1:member2?
The docs only show hardcoded values being used for member1 and member2 and I can get it to work if I use hardcoded values. However if I try to use member functions it throws an error:
"ERROR #5001: Both parts of a range must be members"
.png)
While the below does not give me the correct answers without using the %All function, it does work.
The documentation says that the MDX extended function %TIMERANGE returns a member.
.png)
However it seems like it produces a set of time members from the description ("a range of members"). Perhaps behind the scenes it is making a calculated member? I am able to plug the return "value" from %TIMERANGE into the SUM function, which takes a set as an argument, and I get a correct answer. So SUM((%TIMERANGE(...)) works, however COUNT(%TIMERANGE(...)) does not work and returns a cryptic error:
.png)
Should we be able to use %TIMERANGE as a set argument to any mdx function that takes a set argument?
In the MDX Query Tool I can't seem to get the NOW relative syntax to work correctly. If I just use ".&[NOW]" it works, but something like ".&[NOW-1]" or ".&[NOW-1d]" (for dates extracted using DayMonthYear) it throws an error.
So this works:
.png)
But if I change .&[NOW] to .&[NOW-1] I get this cryptic error message.
.png)
Also, can you use member functions off of NOW? For example can you do something like: [TransactionDateFilter].[H1].[Date].&[NOW].PREVMEMBER ???