Forum Discussion

jrivera43's avatar
jrivera43
Frequent Visitor
5 years ago

Multi-row Aggregations in DAX

Does anyone know how to create multi-row aggregations like this in DAX? I need to get a subcategory under the main category like the image below. I need to create a virtual table first to create a measure from. Any help would be appreciated.

 

 

 

4 Replies

  • Hi, jrivera43 

    I do not know well how your data model looks like. But I tried to create the below sample pbix file based on the explanation.

    I suggest having dim table like below.

    please check the below picture and the sample pbix file's link down below.

    All measures are in the sample pbix file.

     

     

    https://www.dropbox.com/s/pkq9eo4oral5wei/jrivera.pbix?dl=0 

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

     

    • jrivera43's avatar
      jrivera43
      Frequent Visitor

      Thanks Jiwan,

       

      Can you show me what the DAX would look like to create a virtual table using the same structure as the ones shown?

       

       

       

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi, jrivera43 

        Thank you for your feedback.

        Sorry that I quite do not understand your question.

        Do you want to write an incomplete measure? And may I ask what is it for?