Forum Discussion

Daniel___'s avatar
Daniel___
Frequent Visitor
1 year ago
Solved

DAx Support on cartesian table

Hello all,

 

Would like to get you support for a Dax formula. Teorical concept: there are two tables with data one Cost centers (D_CC_Costs) with Expenses and other table the final oucome of allocation to profit centers D_Allocation (done by a automated tool), and what I would like to create is a table with allocation and gave the details from the cost center (such, which kind of expenses: as travel, external support costs and so)
Can not attach the Excel/powerbi document but have the data as below (already with the conection created and D_* data tables and MD_* lookup table).


What I was trying was using virtual table to do this calculation, with all variables combination (as a cartesian table).
From the D_Allocation table I just want to add the Account from D_CC_Costs table so then the calculations can be done (in my real scenario this cartesian/Merge table could go easily to hundred thousand million of rows)
Then, my think was with Calculate( Sumx(generate(Table,generate(Table,...)),..) Allexcept), I would be able to know how much the total of the Sender CC (regardless of the type of expenses from table D_CC_Costs) I´m receiving, so then from these would be just multiply the received CC Sender amount (from D_Allocation table ) / Total CC from D_CC_Costs (get the % of allocation) multiplying by the overall amount from the expenses (and all would work out).
My issue in above scenario is allexcept on this new cartesian table do not work as I expect (have the same amount over the rows per sender CC - as I was expecting to behave), but present the overall costs no matter the CC (or other number).
Can you help me with a way to make it work (with the way I was doing or a different way)?

 

D_Allocation table:

D_CC_Costs Table:

Let me know if I was not clear to express myself,

Thank you in advance

  • Hi @lbendlin , Hi @v-lgarikapat ,

     

    Thank you both for the time/patience and the support. I was able to figure out the way :).

     

    So, Calculate + sumx + all is the key to be able to repeat over the rows te same amount in a cartesian table.

     

     

    Thank you

17 Replies

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • Daniel___'s avatar
      Daniel___
      Frequent Visitor

      Hi Ibendlin,

       

      Sorry on the time which I got to came back 😞 (on something wihch I need support my fault).

       

      Let me try to explain what I´m trying to do in a different way.

      I have 2 tables with data and 5 tables with unique data to do the connection between the data tables.

       

      Then, Need to create a cartesian table as attach file Pivot Table 4 (just the combination of the 5 unique tables). There I try to Calculate Measure CC2 and Measure PC2 and they are the total Per Sender CC in Both data tables Pivot Table 3 and Pivot Table 5 (the "Should be" in green Column 7/8 in Pivot table 4).

      Then having it, will be abe to do the calculations of 9/10/11/12 (being 12 the end goal and having this would have the allocation detail which I´m looking for :)).

       

      Link of Excel file: "https://docs.google.com/spreadsheets/d/1fC8M8WFmWoRzIUx-1LQVbSrIEem-Ykro/edit?usp=drive_link&ouid=100880094106413413304&rtpof=true&sd=true"

       

      If I was not able to explain myself in a good way just let me know.

      Thank you in advance for the time and support.

       

      • lbendlin's avatar
        lbendlin
        Super User

        Thank you for the sample data.  I's a bit inconclusive. Not clear to me how measure CC1 is calculated?  Is it based on Sum of Actual?

  • v-lgarikapat's avatar
    v-lgarikapat
    Community Support

    Hi Daniel___ ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    lbendlin 

    Thanks for your prompt response.

    Daniel___ 

    Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.

    Looking forward to your response.

    Best regards,
    Lakshmi.

    • v-lgarikapat's avatar
      v-lgarikapat
      Community Support

      Hi Daniel___ ,

      We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.

       

      Best Regards,

      Lakshmi

      • v-lgarikapat's avatar
        v-lgarikapat
        Community Support

        Hi Daniel___ ,

        We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.

         

        Best Regards,

        Lakshmi