August 31, 2011 at 6:44 am
Hi All
I am new to writing MDX so please forgive my ignorance.
I was wondering if anyone could recommend an easy way to convert T-SQL to MDX.
I have this script below which I want to convert into a KPI to see how many calls where closed on or before the SLA date and build a gauge
declare @a int
declare @b-2 int
--amount of closed calls
select
@a = COUNT(*)
from
IncidentDimvw
where
Status_IncidentStatusId = 3
--amount of closed calls in side target resolution type
select
@b-2 = COUNT(*)
from
incidentdimvw
where
ResolvedDate <= TargetResolutionTime
and
Status_IncidentStatusId = 3
select @a,@b
select (@b*100) / @a
Can anyone help in translating this to MDX or pointing me in the right direction?
Thanks
Ant
August 31, 2011 at 9:05 am
MDX is as different from T-SQL as T-SQL is from procedural languages. While it's possible to "translate" T-SQL into MDX just as it's possible to "translate" procedural languages into T-SQL, it's just as wrong-headed.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 31, 2011 at 9:14 am
It seems like this would be trivial in any cube browser if you added a measure to the cube for calls with a
"ResolvedDate <= TargetResolutionTime"
August 31, 2011 at 9:35 am
that was the problem, i didnt have a measure.
i have created a new named query which generated the percentage value and mapped it to a measure and dimension to process the cube, then built the KPI around the measure and dimension.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply