Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago

Matrix calculation from another.

I have a matrix in which two periods are compared and in these as values a quantity is used, of lso values of that matrix I need to obtain some accounts as an average between the total to find the percentage and then between certain months. How can I create that resulting graph or that they keep recommends. This made in excel is very easy but when passing it to power bi everything changes because I can not use the information obtained from the matrix.

6 Replies

  • Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
    https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Please show the expected outcome based on the sample data you provided.

    https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • I do not have specific test data since it is a very sequential issue you could say, I will send a screenshot and I hope you can help me. The matrix I have is as follows

    And as if it were an excel I need to calculate from those values an average measure, I mean that I need to use for example to 202206 the first 4 values and calculate the mean, then with 6 values and in the case of those who do not have to use the last ones. My problem is that interaction that I need to know how to find those calculations using dax or how I can implement those already obtained in a new calculation.

  • I have the following matrix or pivot table: . Low Period High Period202207202208202209202210202211202212202301202302202303202304202305202306(blank)Grand TotalGrand Total123452705736377576757185487343101907908459942811129212861611172424017993338262

    20220612345129549968182411342710255956774177076644359444177127704245518
    202207 1410311308890218015128711162784567934726270595280135265248082
    202208 1510114648117302233215983115721074410191106817331170895301208
    202209 15884139391318719894129261144410822111698534168481286280
    202210 147431256111932171541280110770111268153160898260138
    202211 1613715919126671640813891114047786173604267816
    202212 16985110951108219778166479987177156262730
    202301 95581061398491667912668171259230626
    202302 11326102761076214579190929237872
    202303 12010138688876239132273886
    202304 132779653204540227470
    202305 14700234636249336
    202306 247300

    247300

    This graph can be obtained as a visual object, I need to use the values of each high period to create a measure, being such data so specific I need to know how I can do it because first I must divide each data by the total and then use groups of total, 6 and 4 to obtain the variance or mean in another matrix graph or table. I really need help with dax to know how to make the code with which to obtain each data of those and get that total that appears for each month the answer looks something like that.

    MediaMesEarlySixth
    2023034,64%18,57%18,57%
    2023044,60%18,42%25,88%
    20230534,00%23,20%23,20%
    20230623,13%23,20%12,31%
    20230723,21%23,12%22,12%

    This last table is conceptual the data does not give that information but it is to exemplify the problem.

    • lbendlin's avatar
      lbendlin
      Super User

      Is that Pivot table coming from Excel?  If yes, can you post the sample Excel file?

  • It does not let me add files of the extension of excel, I will show how it looks in power bi to exemplify better but because you understand the idea I think: