Percentage of Parent for any deminsion in DAX

Synerverse 1 Reputation point
2021-08-08T16:21:32.617+00:00

What is the equivalence in DAX for percentage of parent for any dimension? I have it for MDX but need the DAX version. Here is the MDX version

WITH MEMBER [Percentage of Parent Sales] AS

CASE
WHEN IsEmpty([Measures].[Sales]) THEN 0
ELSE
IIF
(
IsEmpty(Axis(1).Item(0).Item(0).Dimension.CurrentMember.Parent),
1,
[Measures[Sales] / (Axis(1).Item(0).Item(0).Dimension.CurrentMember.Parent,Measures.Sales)
)
END

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
481 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,551 Reputation points Microsoft Employee Moderator
    2021-08-10T05:44:14.083+00:00

    Hi @Synerverse ,

    Welcome to Microsoft Q&A Platform. Thank you for posting query here.

    Kindly check below Article for Percentage of Parent in DAX
    https://analytics-blog.com/2015/01/18/percent-of-parent-in-hierarchy-dax/

    Also, check similar thing discussed here.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/663184f4-88b1-4705-bcf8-d35e34884d86/percentage-of-parent-for-all-dimensions?forum=sqlanalysisservices

    Below are the useful links which helps to convert MDX to DAX. Please see.
    https://bistuffwithdigven.wordpress.com/2012/07/25/convert-mdx-into-dax-part1/
    https://www.sqlbi.com/articles/converting-mdx-to-dax-first-steps/

    Hope this may help. Please let us know if any further queries.

    -----------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.