Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All....
I'm working on a Scorecard application. There are two tables: Metrics and CRMTransactions. They are linked by MetricId.
I have a straight table with Metric ID as a dimension. For one of my calculations I need to count transactions for a metric and divide them by the count of a different metric. It seems like this should be an easy calculation with set analysis but I can't seem to get it right. Here's my expression:
If(MetricId=5,count({$<CRMTranYear={$(=varYear)}>} CRMRecSource / count({$<MetricId={2}>}CRMRecSource))
I have tested the numerator portion of this equation and it returns the expected value. The denominator portion only returns zero when I test it by itself.
For Metric 5 how do count all of Metric 2 records to use as the denominator of my equation?
Thanks in advance, this has me stumped.
Martha
Hello Martha,
Try this (just add the TOTAL qualifier):
If(MetricId=5,count({$<CRMTranYear={$(=varYear)}>} CRMRecSource / count({$<MetricId={2}>} TOTAL CRMRecSource))
Mike.
Hello Martha,
Try this (just add the TOTAL qualifier):
If(MetricId=5,count({$<CRMTranYear={$(=varYear)}>} CRMRecSource / count({$<MetricId={2}>} TOTAL CRMRecSource))
Mike.
Mike, Thanks. That was the key. I really appreaciate your help.