June 22, 2018 at 4:11 am
Hi
I have a problem with HideMemberIf. I've tried to find answer here and on other sides but nothing helps.
Business case:
I have 2 groups of cost codes:
- Old with flat list of cost codes
- New with 3 levels hierarchy
Dimension table has 5 columns:
NameOfGroup - namelvl1 - namelvl2 - namelvl3 - cost code
And data like that:
Name Old group - NULL - NULL - NULL - cost code
Name New Group - namelvl1 - namelvl2 - namelvl3 - cost code
I've read this articles
https://blog.crossjoin.co.uk/2009/11/11/ragged-hierarchies-hidememberif-and-mdx-compatibility/
https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models/user-defined-hierarchies-ragged-hierarchies?view=sql-server-2014
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e990d045-87b8-4825-8ea1-593755386de5/hidememberif-parentname-is-not-working-in-ssas?forum=sqlanalysisservices
and the most interesting https://xzwang.wordpress.com/2013/07/10/ragged-hierarchy-and-hidememberif/
I've replaced NULLs with cost code so now table looks:
Name Old group - cost code- cost code- cost code- cost code
Name New Group - namelvl1 - namelvl2 - namelvl3 - cost code
And use ParentName or OnlyChildWithParentName but I still see hierarchy like:
Name Old group
- cost code
- cost code
- cost code
- cost code
What am I doing wrong?
Sorry if it is too easy question or unclear - I'm new in SSAS .
Best regards
Bartek
June 22, 2018 at 6:01 am
Asking question helps find answer
The problem was in data type - cost code are int but I casted them to varchar so data were
NameOfOldGroup(varchar) - cost code(varchar) - cost code(varchar) - cost code(varchar) - cost code(int).
And advise to hide lthe lowest lvl too https://www.sqlservercentral.com/Forums/1020377/Hidememberif
I've spend two days to find this answer and now I'll remember it for long
B
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy