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
Anonymous
Not applicable

how to fetch a value by comparing multiple column values with in the same table

Hi all,

I have created a calulated table with columns Monthyear,status ,Module and completion % in PBI Desktop . I want to find out  Deviation % from the goal
by comparing 'module','Monthyear' and fetch respective complete% of 'status' complete  then, complete%- Module specific target(for aaa 85% , for bbb 90%) .

Require column data would look like as 'Final format'

 

Deviation Sample data.PNG

 

 

 

 

 

 

Finally i am gonna show this data in matrix as shown below.

 

Deviation Matrix.PNGHope that makes sense. Any help will be appreciated.

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

You can get the Deviation using below measure:

Deviation = var a  = CALCULATE(MAX([Completition%]),FILTER(ALL('Table'),[Status]="Complete"),VALUES('Table'[Module]),VALUES('Table'[MonthYear]))
Return
IF(MAX('Table'[Module])="aaa",a-0.85,a-0.9)

Then create the matrix:

4.PNG

pbix attached.

Community Support Team _ Dina Ye
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

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

You can get the Deviation using below measure:

Deviation = var a  = CALCULATE(MAX([Completition%]),FILTER(ALL('Table'),[Status]="Complete"),VALUES('Table'[Module]),VALUES('Table'[MonthYear]))
Return
IF(MAX('Table'[Module])="aaa",a-0.85,a-0.9)

Then create the matrix:

4.PNG

pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

 Hi  ,

 

Thank you for the solution. Keep rock the same way.!!!

 

Cheers!

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.