cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to get " Deviation from target " value for specific category of data as Total in Matrix visual

Hi All,

I'm facing hard to get customize Totals value in Matrix.

I have columns

'Status'(on Rows) values as Completed, Unable, Incomplete 

Monthyear(on columns) as Jan2019,Feb2019,etc..

and taking record count as Values

in a Matrix . (I'm getting 'percent of column total' from 'Show values' for each column)
my requirement is to get % of record count diviated from target for 'Completed' value only (yellow highlighted in below screen).

per Ex:
Target goal = 85%
Deviation from Target goal = observed 'Completed' record count % - Target goal %

 

Matrix visual.PNG

 

 

 

 

 

 


Any help or advice would be appriciated.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to get " Deviation from target " value for specific category of data as Total in

Hi Munwar,

If your data sample is similar  to  below, you could try below measures

statusdatetarget

Completed1/1/20190.85
Unable1/1/20190.85
Incompleted1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Unable1/1/20190.85
Unable1/1/20190.85
Incompleted1/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Unable2/1/20190.85
Incompleted2/1/20190.85
Incompleted2/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Incompleted3/1/2019

0.85

 

 

 

You could create two measures like below

Measure 3 =
CALCULATE ( COUNT ( test1[status] ) )
    / CALCULATE (
        COUNT ( test1[status] ),
        FILTER ( ALL ( test1 ), test1[date] = MIN ( test1[date] ) )
    )
Measure 4 =
IF (
    HASONEVALUE ( test1[status] ),
    [Measure 3],
    CALCULATE ( [Measure 3], test1[status] = "Completed" )
        - MIN ( test1[target] )
)

182.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: How to get " Deviation from target " value for specific category of data as Total in

So it looks like your issue is with the matrix total line not being as easily customizable as you would wish.

 

Quick question, what are you using to populate each field? Is that a measure that returns 50%/20%/30% or a data field?  What expression are you using for that?

 

Long story short, you want to create a measure using ISINSCOPE to define different behavior based on where in the matrix you are calculating.

 

So for your example, if the values you currently have are calculated by a measure called [Observed %], you would write a measure like this:

[Observation % for Matrix] = 
IF( ISINSCOPE(Table[Status]), 
    [Observed %], 
    CALCULATE( [Observed %], Table[Status] = "Completed") - 0.85
)

You'll have to replace terms with the actual names of your data columns/measures, but this is the basic form of a measure that will give a different result for the subtotal row/column than each individual row.

Community Support Team
Community Support Team

Re: How to get " Deviation from target " value for specific category of data as Total in

Hi Munwar,

If your data sample is similar  to  below, you could try below measures

statusdatetarget

Completed1/1/20190.85
Unable1/1/20190.85
Incompleted1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Completed1/1/20190.85
Unable1/1/20190.85
Unable1/1/20190.85
Incompleted1/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Completed2/1/20190.85
Unable2/1/20190.85
Incompleted2/1/20190.85
Incompleted2/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Completed3/1/20190.85
Incompleted3/1/2019

0.85

 

 

 

You could create two measures like below

Measure 3 =
CALCULATE ( COUNT ( test1[status] ) )
    / CALCULATE (
        COUNT ( test1[status] ),
        FILTER ( ALL ( test1 ), test1[date] = MIN ( test1[date] ) )
    )
Measure 4 =
IF (
    HASONEVALUE ( test1[status] ),
    [Measure 3],
    CALCULATE ( [Measure 3], test1[status] = "Completed" )
        - MIN ( test1[target] )
)

182.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: How to get " Deviation from target " value for specific category of data as Total in

Hi @dax , @Cmcmahan 

 

Thank you for your time. My bad, i was unable to fix this with the inputs received... i feel the requirement was not get framed well earlier hence i'm
sharing a sample pbix (dropbox link) contains data and requirement . This report has two matrix for plans 'abc' and 'xyz' with complete and incomplet counts
summary in 'column total percentages'. Each plan has different goal number percentages.
Finally Total would be as Deviation From Goal = Observed complete % (1 st row) - respective plan goal %
Yellow highlighted in below.Deviation from goal screen1.PNG

 

Please download the pbix file from here:

https://www.dropbox.com/s/8br57btqwxopp6j/Custom%20Total%20sample%20file.pbix?dl=0

 

Thankyou!

 

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors