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
mohitkr_01
Frequent Visitor

If Function not evaluating the expression correctly in Matrix /Table

I am trying to compare the values of a table(B) with a lookup Value( From Table A)  

I am using FileDate to pick the value AV from Table A using measure,AV_A.

AV_A =
var dt = SELECTEDVALUE('B'[FileDate])
var av_m = CALCULATE(sum('A'[AV]), FILTER(('A'), 'A'[FileDate] = dt))
return av_m


and then using output of AV_A to compare with measure AB_B with the help of measure Test

AV_B = (SUM('B'[AV]))
TestIF([AV_A] = [AV_B],TRUE(),FALSE())
Looks pretty simple and easy. But I am perplexed by the result it produced in Matrix or table visualization. I am attached the screenshot by Highlighting the anamoly.
I also dont want to show the values at subrow level ('distinct') and Total but want to show True/False for the Top row level ('Field') in matrix.
Any insight by the community members will be highly appreciated.
 

 

Captured from MatrixCaptured from Matrix

 

Captured from TableCaptured from Table

 

 

2 REPLIES 2
mohitkr_01
Frequent Visitor

Hello Team_Tang,

Yes I want to get the outcome as you mentioned in screenshot and no Grand Total in matrix.

I am includng the screenshot of all values of Table A and some values of table B.

 

A&B.PNG

 

v-xiaotang
Community Support
Community Support

Hi @mohitkr_01 

Thanks for reaching out to us.

Could you please provide some sample data in table A & B? And the expected outcome according to it? Thanks.

>>I also dont want to show the values at subrow level ('distinct') and Total but want to show True/False for the Top row level ('Field') in matrix.

Is the outcome below you want to get?

vxiaotang_0-1655104685501.png

 

 

Best Regards,

Community Support Team _Tang

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

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.

Top Solution Authors