Forum Discussion
Marc
Not sure about the binary table but try this SQL equivalent to your data record table. If you want to show the monthly value in columns just use the inner query. Put this SQL in a data adapter => Grid => dashboard etc.. and make sure you put in real values for cube name etc.. in the WHERE clause.
SELECT datacube
,entity
,scenario
,account
,ud1
,ud2
,ud3
,ud4
,ud5
,ud6
,ud7
,ud8
,mvalue
,mvaluename
FROM (
SELECT c.name AS datacube
,e.name AS entity
,s.name AS scenario
,a.name AS account
,u1.name AS ud1
,u2.name AS ud2
,u3.name AS ud3
,u4.name AS ud4
,u5.name AS ud5
,u6.name AS ud6
,u7.name AS ud7
,u8.name AS ud8
,dr.M1Value AS v1
,dr.M2Value AS v2
,dr.M3Value AS v3
,dr.M4Value AS v4
,dr.M5Value AS v5
,dr.M6Value AS v6
,dr.M7Value AS v7
,dr.M8Value AS v8
,dr.M9Value AS v9
,dr.M10Value AS v10
,dr.M11Value AS v11
,dr.M12Value AS v12
FROM datarecord2021 dr --data record table
LEFT JOIN cube c ON c.cubeid = dr.cubeid
LEFT JOIN member s ON s.memberid = dr.scenarioid
LEFT JOIN member a ON a.memberid = dr.accountid
LEFT JOIN member e ON e.memberid = dr.entityid
LEFT JOIN member u1 ON u1.memberid = dr.ud1id
LEFT JOIN member u2 ON u2.memberid = dr.ud2id
LEFT JOIN member u3 ON u3.memberid = dr.ud3id
LEFT JOIN member u4 ON u4.memberid = dr.ud4id
LEFT JOIN member u5 ON u5.memberid = dr.ud5id
LEFT JOIN member u6 ON u6.memberid = dr.ud6id
LEFT JOIN member u7 ON u7.memberid = dr.ud6id
LEFT JOIN member u8 ON u8.memberid = dr.ud7id
WHERE c.name = '<cubename>'
AND e.name = '<entityname>'
AND s.name = '<scenarioname>'
) m
unpivot(mvalue FOR mvaluename IN (
v1
,v2
,v3
,v4
,v5
,v6
,v7
,v8
,v9
,v10
,v11
,v12
)) u
Best
Sai
Related Content
- 3 months ago
- 12 months ago