Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, there!
Need your help with issue: I need to make expression, that will calc a Sum(Value) for max DateReport.
But if DateReport has added to table as Dimension, then I need to get Sum(Value) for current DateReport.
Here example. I try to use expression
=If(Dimensionality()=0,
Sum({<DateReport={"$(=Max(Date(DateReport)))"}>}Value),
Sum(Value)).
But problem is that it works fine for first table, but doesn't work for second.

Second table should look like this:

I need to use it in Ad-hoc reporting, so I have one table with all Dimensions (users choose Dimensions for table by themselves), and I need one expression.
Does this you are expecting simple two expressions for 2 different charts? Or You want to make as Ad-Hoc reports the same?
No.
Your exp for 1st table:
= IF(Dimensionality() = 3, Sum(Value), Sum({< NewDate = {'$(vMaxDate)'} >} Value))
for second:
= Sum( {< NewDate = {'$(vMaxDate)'}, Branch= >} Value)
As you see, they have different syntax.
I need the same expressions (with same syntax) which fits for both tables.
I need 1 expression for two charts.
It should fit for both charts.
May be i miss something the requirement, Seems what you need i've shown the same, Assuming. If not Can you tell me why you want only single syntax for 2 different Objects?
Because in output solution will be only 1 table, and user will be decide which Dimensions he want to add to table.
Tell me how you are expecting in Table, Even thought it is single tabular you must show the expected object? So that we may get better thoughts. And i would highly recommend to mark as helpful if you found some thing related while Thread
No did you check my latest file? I am using the same expression in those two tables.
Which is this.
= IF(Dimensionality() = 3, Sum(Value), Sum({< NewDate = {'$(vMaxDate)'} >} Value))
Unless if i am missing something completely different to what you are expecting?
Check this out:
Sheet: Applicant Details.
My solution works like this.
So your Expression is the:
= IF(Dimensionality() = 3, Sum(Value), Sum({< NewDate = {'$(vMaxDate)'} >} Value))
The weak of this solution is if we remove, for example, Dimension [Subbranch] from the 1st table, the result will be like that:

So, it's not fit.
Try this?
= IF(Dimensionality() > 0, Sum(Value), Sum({< NewDate = {'$(vMaxDate)'} >} Value))