<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx</link><description>Some time ago, I wrote a post about how to handle Parent/Child hierarchies in PowerPivot 1.0. It was pretty intricate, because P/C are not handled natively in PowerPivot. Now, with the advent of Denali, Microsoft gave us all the functions needed to handle</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37106</link><pubDate>Tue, 19 Jul 2011 10:26:26 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37106</guid><dc:creator>milang</dc:creator><description>&lt;p&gt;I was just looking for this. Thanks :)&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37113</link><pubDate>Tue, 19 Jul 2011 13:53:28 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37113</guid><dc:creator>milang</dc:creator><description>&lt;p&gt;If you needed a measure (SumOfLeafAmount) that only shows childrens values, what would it be like?&lt;/p&gt;
&lt;p&gt;In that case Annabel should show only the values for her leaf members (1200+800+600=2600) and Bill should show 1200 (400+500+300=1200).&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37121</link><pubDate>Tue, 19 Jul 2011 18:23:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37121</guid><dc:creator>incognito007</dc:creator><description>&lt;p&gt;If reverse the order of the formular &amp;quot;BrowseDepth&amp;quot; as below:&lt;/p&gt;
&lt;p&gt;if(isfiltered(level1),1&lt;/p&gt;
&lt;p&gt;if(isfiltered(levle2),2&lt;/p&gt;
&lt;p&gt;if(isfiltered(level3),3)))&lt;/p&gt;
&lt;p&gt;It all return 1.&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37123</link><pubDate>Tue, 19 Jul 2011 19:03:12 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37123</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Incognito,&lt;/p&gt;
&lt;p&gt;At BrowseDepth=2, both Level1 and Level2 are filtered. Thus, ISFILTERED(Level1) is always true, if the hierarchy is in the PivotTable. You need to start from the farthest node from the root with your tests to get meaningful results, because, at the leaf level, all levels are filtered.&lt;/p&gt;
&lt;p&gt;@Milang,&lt;/p&gt;
&lt;p&gt;Your &amp;quot;simple&amp;quot; question inspired my next blog post. Thus, the answer is coming but... as an innocent question as it looks, it is not very easy.&lt;/p&gt;
&lt;p&gt;Stay tuned :)&lt;/p&gt;
</description></item><item><title>Tabular Parent/Child Dimensions: SumOfLeaves and the CALCULATE wall</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37128</link><pubDate>Tue, 19 Jul 2011 21:05:56 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37128</guid><dc:creator>Alberto Ferrari</dc:creator><description>&lt;p&gt;In my last post about Parent/Child hierarchies , there is a question, in the comments, that I found interesting.&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37273</link><pubDate>Sun, 24 Jul 2011 08:51:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37273</guid><dc:creator>Stef</dc:creator><description>&lt;p&gt;What about unary operators? How would you implement this very helpful functionality in tabular?&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#37278</link><pubDate>Sun, 24 Jul 2011 21:18:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37278</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Stef,&lt;/p&gt;
&lt;p&gt;I have already written about unary oeprators with DAX here: &lt;a rel="nofollow" target="_new" href="http://sqlblog.com/blogs/alberto_ferrari/archive/2011/03/01/powerpivot-parent-child-and-unary-operators.aspx"&gt;http://sqlblog.com/blogs/alberto_ferrari/archive/2011/03/01/powerpivot-parent-child-and-unary-operators.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The very same technique can be used in Denali, the only issue being in computing the sign of leaf level nodes at each browse depth, but this can be easily accomplished with DAX.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#38742</link><pubDate>Tue, 27 Sep 2011 02:04:13 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38742</guid><dc:creator>challen</dc:creator><description>&lt;p&gt;Hi Alberto, could you please show the sample on this link? my personal email is youhoo_Fu@hotmail.com &lt;a rel="nofollow" target="_new" href="http://sqlblog.com/blogs/alberto_ferrari/archive/tags/PowerPivot/default.aspx"&gt;http://sqlblog.com/blogs/alberto_ferrari/archive/tags/PowerPivot/default.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Many thanks. &lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#39199</link><pubDate>Wed, 19 Oct 2011 15:04:56 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39199</guid><dc:creator>Stef</dc:creator><description>&lt;p&gt;Hello Alberto&lt;/p&gt;
&lt;p&gt;thanks for your answer concerning unary operators. Now I would like to create something like a calculated member in the account hierarchy. Can you explain me how one can achieve this. Thanks a lot. &lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#39202</link><pubDate>Wed, 19 Oct 2011 18:05:31 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39202</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Stef,&lt;/p&gt;
&lt;p&gt;Well, your request is a very generic one, I'd need to understand your specific issue better to give any kind of answer, you can accomplish a similar behavior with an IF statement but... it really depends from the specifics of your need.&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#39313</link><pubDate>Sat, 22 Oct 2011 12:26:36 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39313</guid><dc:creator>Stef</dc:creator><description>&lt;p&gt;With UDM and MDX I could create KPIs for example the ratio of two real members of the [Account] dimension (total net revenue / total FTE) and add the calculated member to the account hierarchy. I would like to achieve something similar with tabular model&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#39367</link><pubDate>Tue, 25 Oct 2011 10:53:43 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39367</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Stef,&lt;/p&gt;
&lt;p&gt;It can be done using IF inside a measure. Not very elegant, but it can be done... if you need the complete solution, I need to look at your workbook to write one.&lt;/p&gt;
&lt;p&gt;In general, in Tabular you will need to write several measurea and then a single one using IF or SWITCH to choose the right value to show at each level, so to mimic calculated members.&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#40277</link><pubDate>Mon, 12 Dec 2011 14:44:34 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40277</guid><dc:creator>Karthik</dc:creator><description>&lt;p&gt;Hi Alberto,&lt;/p&gt;
&lt;p&gt;Thanks for this post.&lt;/p&gt;
&lt;p&gt;I have a scenario where I use P/C hierarchy to construct and browse by Organisation Structure in the Employee dimension itself.Structure looks like below:&lt;/p&gt;
&lt;p&gt;&amp;#166;EmployeeID&amp;#166;EmpName&amp;#166;OrganisationID&amp;#166;ParentOrgID&amp;#166;&lt;/p&gt;
&lt;p&gt;Issue is that in such a case, every ParentOrgID need not occur in the OrgID column,(i.e. every org unit need not have an employee directly assigned to it). So, the PATH function does not work and instead gives the error: &amp;nbsp;&amp;quot;Calculation error in column 'dimEmployee'[]: The value '1209' in 'dimEmployee'[ParentOrgID] must also exist in 'dimEmployee'[organisationid]. &amp;nbsp;Please add the missing data and try again.&amp;quot;&lt;/p&gt;
&lt;p&gt;The function description on msdn points out that &amp;quot;Values in parent_columnName must be present in ID_columnName.&amp;quot; But as in this case, the business scenario can be different unlike the employee-manager structure. Can you think of any solution for this ? Thank you.( I can think of modelling as two different dimensions and hiding the blank ones as in your post, but I have a feeling that this kind of parent-child scenario should have been supported by the PATH function as well)&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#40285</link><pubDate>Mon, 12 Dec 2011 21:31:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40285</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Karthik,&lt;/p&gt;
&lt;p&gt;A quick answer is &amp;quot;you should model it as two dimensions: one P/C and another one as a classical dimension&amp;quot;.&lt;/p&gt;
&lt;p&gt;Another possible solution would be to use a calculated column to blank out links to non-existent parents.&lt;/p&gt;
&lt;p&gt;It all depends from the data model you want the customer to browse...&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#41666</link><pubDate>Thu, 09 Feb 2012 21:59:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41666</guid><dc:creator>Francesco De Chirico</dc:creator><description>&lt;p&gt;Hi Alberto,&lt;/p&gt;
&lt;p&gt;what do you think about modify BrowseDepth formula in this way:&lt;/p&gt;
&lt;p&gt;BrowseDepth := ISFILTERED('Hierarchy'[Level1]) + ISFILTERED('Hierarchy'[Level2]) + ISFILTERED('Hierarchy'[Level3])&lt;/p&gt;
&lt;p&gt;avoiding the use of the IF() functions?&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#41667</link><pubDate>Thu, 09 Feb 2012 22:07:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41667</guid><dc:creator>AlbertoFerrari</dc:creator><description>&lt;p&gt;@Francesco,&lt;/p&gt;
&lt;p&gt;This looks a great definition for the formula, much easier to write and mantain. Like it very much! :)&lt;/p&gt;
&lt;p&gt;Thanks for sharing this.&lt;/p&gt;
</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#44363</link><pubDate>Thu, 19 Jul 2012 01:37:23 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44363</guid><dc:creator>skiwi</dc:creator><description>&lt;p&gt;so essentially we have to hard code how many levels there are? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;if so this is a massive problem and will mean that many will have to use regular SSAS. &amp;nbsp;what if you work for an organisation of 100,000+ people where there could be 20 or more levels...&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#46104</link><pubDate>Mon, 12 Nov 2012 14:28:59 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46104</guid><dc:creator>txeriff</dc:creator><description>&lt;p&gt;Hi Alberto, &lt;/p&gt;
&lt;p&gt;Thank you for your post! it helped me lots.&lt;/p&gt;
&lt;p&gt;I have a short question:&lt;/p&gt;
&lt;p&gt;I have this hierarchy;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://social.msdn.microsoft.com/Forums/getfile/192856"&gt;http://social.msdn.microsoft.com/Forums/getfile/192856&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For some reason the first row, area 30 its doing 36-22=14.&lt;/p&gt;
&lt;p&gt;22 its the value from SQL Query to the tables.&lt;/p&gt;
&lt;p&gt;No clue why its doing subtraction&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#48148</link><pubDate>Sat, 09 Mar 2013 16:43:21 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48148</guid><dc:creator>Juan José Macias</dc:creator><description>&lt;p&gt;Hola,&lt;/p&gt;
&lt;p&gt;Yo para eliminar los espacios en blanco aplico las siguientes formulas para cada nivel:&lt;/p&gt;
&lt;p&gt;Level 1:&lt;/p&gt;
&lt;p&gt;LOOKUPVALUE(Hierarchy[Node];Hierarchy[ParentNodelID];PATHITEM(Hierarchy[HierarchyPath];1;1))&lt;/p&gt;
&lt;p&gt;Level 2:&lt;/p&gt;
&lt;p&gt;IFf(ISBLANK(PATHITEM(Hierarchy[HierarchyPath];2;1)); &amp;quot;(&amp;quot; &amp;amp; LOOKUPVALUE(Hierarchy[Node];Hierarchy[ParentNodelID];PATHITEMREVERSE(Hierarchy[HieararchyPath];1;1))&amp;amp;&amp;quot; datos)&amp;quot;; LOOKUPVALUE(Hierarchy[Node];Hieararchy[HierarchyPath];PATHITEM(Hieararchy[HieararchyPath];2;1)))&lt;/p&gt;
&lt;p&gt;Level 3 y sucesivos:&lt;/p&gt;
&lt;p&gt;La f&amp;#243;rmula ser&amp;#237;a igual pero en vez de 2;1 indicar 3;1 , 4;1 y as&amp;#237; hasta el &amp;#250;ltimo nivel.&lt;/p&gt;
&lt;p&gt;Un saludo y gran blog.&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#48628</link><pubDate>Wed, 10 Apr 2013 18:14:19 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48628</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;Thanks ! Very good analyse and elegant solution (it is just a shame that MS does not work naturaly like that...)&lt;/p&gt;
&lt;p&gt;btw the PATHLENGTH work only with 'piped' full path.&lt;/p&gt;
&lt;p&gt;I usualy use /, for a better human user comprehenssion.&lt;/p&gt;
&lt;p&gt;If you are in the same situation, just use a Dax SUBSTITUTE (PATHLENGTH(SUBSTITURE([HierarchyPath];&amp;quot;/&amp;quot;;&amp;quot;|&amp;quot;)&lt;/p&gt;</description></item><item><title>re: Parent/Child Hierarchies in Tabular with Denali</title><link>http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx#49116</link><pubDate>Sun, 19 May 2013 02:58:27 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:49116</guid><dc:creator>ziy</dc:creator><description>&lt;p&gt;i just wanna know weather ferrari has a tall or hierarchical organizational structure &amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank you &lt;/p&gt;</description></item></channel></rss>