Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AndreaPRJ
Helper I
Helper I

see corrected totals in a matrix

Hello everyone, I have been approaching the product for a short time and I would have a problem in solving a customer request.

 

We have a main table with assets and 3 tables linked to it with the "COLONNA JOIN X" key, where I have the absolute performance for each asset. There are 3 asset levels and each level has its absolute performance, which MUST NOT BE THE SUM, but a value that is always the same

Immagine 2021-09-17 100220.jpgI attach the Level 3 join table (already filtered for a certain date i use in the report) where we see that the absolute performance of the "Fondi Edge"  asset (on Level 3) is 99.9% 

Immagine 2021-09-17 100443.jpg

I attach also Level 4 join table (also already filtered for the same date) where we see that the absolute performance of the "Other Edge Funds" asset (on Level 4) is 8.16% and that of the "Multistrategy Edge Funds" asset is instead of 5.09%

Immagine 2021-09-17 100753.jpg

well, if I show everything in a normal table (at the bottom level) there are no problems and I see the correct data, if instead I use a matrix, it always gives me the 99.9% at all levels (therefore always the percentage of the "highest" level (Level 3)).

Immagine 2021-09-17 101429.jpg

for PERF%  i Used Maximun 

 

Immagine 2021-09-17 102107.jpg


I thank in advance anyone who can help me to show the correct performance / percentages with the matrix (which is the tool the customer would like).

Regards

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @AndreaPRJ,

 

This is a context problem when you make the measure has you are doing you only pick up the level 3 value so for all lines in the matrix no matter the level it is will pick up level 3 value and calculate accordingly. 

 

What you need to do is to add the additional context to your measure so try the following measure. 

 

 
 

 

Performance Percentage =
var tempTable =             SUMMARIZE (
                'Analisi perf &bmk',
                'Analisi perf &bmk'[LIVELLO_5],
                'Analisi perf &bmk'[LIVELLO_4],
                'Analisi perf &bmk'[LIVELLO_3],
                'tabella join l5'[PERFORMANCE_PERCENTUALE],
                'tabella join l4'[PERFORMANCE_PERCENTUALE],
                'tabella join l3'[PERFORMANCE_PERCENTUALE]
            )
return
SWITCH (
    TRUE (),
ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_5] ),
        MAXX (
tempTable,
            'tabella join l5'[PERFORMANCE_PERCENTUALE]
        ),
    ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_4] ),
        MAXX (
tempTable,
            'tabella join l4'[PERFORMANCE_PERCENTUALE]
        ),
    ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_3] ),
        MAXX (
tempTable,
            'tabella join l3'[PERFORMANCE_PERCENTUALE]
        )
)
 
 

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @AndreaPRJ,

 

This is a context problem when you make the measure has you are doing you only pick up the level 3 value so for all lines in the matrix no matter the level it is will pick up level 3 value and calculate accordingly. 

 

What you need to do is to add the additional context to your measure so try the following measure. 

 

 
 

 

Performance Percentage =
var tempTable =             SUMMARIZE (
                'Analisi perf &bmk',
                'Analisi perf &bmk'[LIVELLO_5],
                'Analisi perf &bmk'[LIVELLO_4],
                'Analisi perf &bmk'[LIVELLO_3],
                'tabella join l5'[PERFORMANCE_PERCENTUALE],
                'tabella join l4'[PERFORMANCE_PERCENTUALE],
                'tabella join l3'[PERFORMANCE_PERCENTUALE]
            )
return
SWITCH (
    TRUE (),
ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_5] ),
        MAXX (
tempTable,
            'tabella join l5'[PERFORMANCE_PERCENTUALE]
        ),
    ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_4] ),
        MAXX (
tempTable,
            'tabella join l4'[PERFORMANCE_PERCENTUALE]
        ),
    ISINSCOPE ( 'Analisi perf &bmk'[LIVELLO_3] ),
        MAXX (
tempTable,
            'tabella join l3'[PERFORMANCE_PERCENTUALE]
        )
)
 
 

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Very very good

it works perfectly and is just what I needed. Thank you so much for your invaluable help!

super!

MFelix
Super User
Super User

Hi @AndreaPRJ ,

 

This has to do with the context of the values, when you go to the totals the context changes and the result is calculated based on that new context.

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I can send you the file via wetransfer if you like

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.