{"id":280,"date":"2008-11-11T16:08:48","date_gmt":"2008-11-11T23:08:48","guid":{"rendered":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/2008\/11\/11\/hidden-little-trend-arrows-2\/"},"modified":"2008-11-11T16:08:48","modified_gmt":"2008-11-11T23:08:48","slug":"hidden-little-trend-arrows-2","status":"publish","type":"post","link":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/2008\/11\/11\/hidden-little-trend-arrows-2\/","title":{"rendered":"Hidden little trend arrows"},"content":{"rendered":"<p>Many readers of this blog use JPivot.  The solidly average web based Pivot Viewer that I&#8217;ve heard described as a &#8220;relic&#8221; of the cold war &#8211; no frills utility software.  However, as maligned as JPivot is, it does have some great features and has been production quality software for years now.  One of these hidden little features that is in JPivot (and also in Pentaho) is the quick and easy way to add trend lines to a JPivot screen by simply using MDX.<\/p>\n<p>Consider, for instance, this little bit of MDX:<\/p>\n<blockquote><p>with member [Measures].[Variance Percent] as &#8216;([Measures].[Variance] \/ [Measures].[Budget])&#8217;, format_string = IIf(((([Measures].[Variance] \/ [Measures].[Budget]) * 100.0) &gt; 2.0), &#8220;|#.00%|<strong>arrow=&#8217;up&#8217;<\/strong>&#8220;, IIf(((([Measures].[Variance] \/ [Measures].[Budget]) * 100.0) &lt; 0.0), &#8220;|#.00%|<strong>arrow=&#8217;down&#8217;<\/strong>&#8220;, &#8220;#.00%&#8221;))<br \/>\nselect NON EMPTY {[Measures].[Actual], [Measures].[Budget], [Measures].[Variance], [Measures].[Variance Percent]} ON COLUMNS,<br \/>\nNON EMPTY Hierarchize(Union({[Positions].[All Positions]}, [Positions].[All Positions].Children)) ON ROWS<br \/>\nfrom [Quadrant Analysis]<\/p><\/blockquote>\n<p>which produces this lovely set of arrows letting the user know how their individual variance value rates in terms of KPI thresholds.<\/p>\n<p><a href=\"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2008\/11\/200811111457.jpg\" onclick=\"window.open('http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2008\/11\/200811111457.jpg','popup','width=580,height=352,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false\"><img decoding=\"async\" src=\"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-content\/uploads\/2008\/11\/200811111457.jpg\" hspace=\"4\" vspace=\"4\" alt=\"200811111457\" \/><\/a><\/p>\n<p>The secret of course, is the arrow= tag in the format string.  Easy enough.  &#8220;up&#8221; is a green up arrow.  &#8220;down&#8221; is a little red arrow.  &#8220;none&#8221; is no arrow.<\/p>\n<p>Happy Visual Cue Indicator day to you all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many readers of this blog use JPivot. The solidly average web based Pivot Viewer that I&#8217;ve heard described as a &#8220;relic&#8221; of the cold war &#8211; no frills utility software. However, as maligned as JPivot is, it does have some great features and has been production quality software for years now. One of these hidden [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,11],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts\/280"}],"collection":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":0,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nicholasgoodman.com\/bt\/blog\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}