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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Mahi1827
Resolver I
Resolver I

How to get percentage from measures which are fetching from 2 different matrix values

Hi, 
I have 2 matrix visuals, data like below and to find percentage from both matrix 1 & 2 and show % in matrix 3

 

Matrix 1

---------

Ticket Type            high        low
Ticket status
open                        10           5
close                         15           7
reopen                      20          4

in above data group by Ticket type and ticket status with respect to id and created measure for totalnumbers=distinctcount(table[id])

 

Matrix 2

---------

Ticket Type          high           low
Ticket status
open                       5               3
close                       2                4
reopen                   4                1

in above data group by Ticket type and ticket status and getting only closed tickets with decision takn as "Yes", created measure is

closeddecisiontickets=CALCULATE(DISTINCTCOUNT(table[ID]), FILTER(table, table[decision]= "yes"))+0


In Matrix 3 i would like to show percentage of both matrix 1 and matrix 2, here is my formula for percentage

percentage= closed decisiontickets/totalnumbers

 

Matrix 3 expected output

--------------------------------

Ticket Type              high%           low%
Ticket status
open                         50%          60%
close                         13.3%        58%
reopen                       20%           25%


for example individual matrix 2 values divided by matrix 1 values for example ( in matrix 2 close status value 2/matrix 1 status value 15). ( 2/15)=13.3%


so created measure is
measure_percentage= (closed decisiontickets/totalnumbers) but i am not getting accurate % values

so please check and update correct measure or best approach to get matrix 3 expected output.

 

Thanks in advance for your help.

 

Thanks,

Mahi1827

 

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Mahi1827 ,

 

DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.

Please create a pbix using dummy data based on your data model and share the sample pbix via cloud service like onedrive for business.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

 

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

Ashish_Mathur
Super User
Super User

Hi,

Your formulas seem correct.  Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Mahi1827 , create a common table Ticket Type /Status and the create these measures and analyze with help from common table

 

create measures like

divide(sum(Matrix1[high]),sum(Matrix2[high]))


divide(sum(Matrix1[low]),sum(Matrix2[low]))

 

https://www.youtube.com/watch?v=Bkf35Roman8

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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