Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

ssas tabular - what if different measures use different anchor dates?

$
0
0

Hi we run 2016 enterprise ssas. 

we will have over 100 metrics, ie calculated members/measures in our project.  All except one or two of them are calculated as the sum of one fact (factor) divided by the sum of another fact.  The facts are separate columns in a fact table represented by a 0 or 1.  A factor can be used in more than 1 measure.

Essentially, all metrics make sense only in the context of a specific date.  That date is the  anchor date  for that metric.  Different metrics use different anchor dates.  Many use the same.  And they all “share” about 14 other dimensions.

Its important for us to be able to pivot even metrics with different anchor dates together.   I’m providing an example below.  Not only would a calculated measure need to know which date column to use, but the query would somehow need to pass the same date to all measures to be used over their respective  anchor  dates.

One of our peers believes the only way to do this in tabular is to shape what he calls a “stack”.  One column in the stack record would be the calc measure name.  2 cols would contain the numerator and denominator.  And there would be one column called “anchor date” in each stack record.   He likes this idea also because there is essentially one calculation for all measures…numerator / denominator.

My question is “is this the only way?"  Isn’t there a more traditional approach?  Sure each calc would be less uniform in a more traditional approach but we wouldn’t be painting ourselves into a corner.  And the moment a square root shows up on the scene we wouldn’t be reshaping the data.

Example:

Calc1 = sum Factor A / sum Factor B.   Anchor date is ship date.
Calc2 = sum Factor X / sum Factor Y.   Anchor date is order date.

The easier question is for “anchor date” 1/1/2019, how can I get these two calcs to show (side by side) up in my query or excel pivot by just passing 1/1/2019 once?

Maybe the tougher question, what if there are n dates that I want passed, expecting the dates to act as separate slicers?


Viewing all articles
Browse latest Browse all 14337

Trending Articles