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

DAX Calculated Column Boolean Field - Double Amount Of Rows Expected Issue In Output Results

I would like a calculated Field to produce the "Type" field below in this context.

 

Date

Val1Val2Abs Value DiffType
1/1/2018541Mismatch
1/2/2018550Match
1/3/2018561Mismatch

 

 

Here is the Calculated Column Formula I am currently using:

IF([Abs Value Diff] > 0,"MisMatch","Match")

 

My current output is producing these unwanted results:

 

auditDateABS Value DiffType
1/1/20180Match
1/1/20181MisMatch
1/2/20180Match
1/2/20180MisMatch
1/3/20180Match
1/3/2018-1MisMatch

 

 

7 REPLIES 7
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

As Ashish_Mathur said, please share some sample data, and show us the calculated formula of Val1, Val2 and Abs Value Diff.

 

Regards,

Yuliana Gu

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

Thank you for your responses and help. Let me clarify and answer your questions.

1. The only calculated measure in table below is "ABC - MH (ABS)"

 

ABC - MH (ABS) = ABS(
                                  sum('Table1'[ABC]) - sum('Table1'[MH])
                                     )

2. Add fields come from same table

 

How can I create a filter field (calculated column?) to view auditDates that have mismatched and matched counts?

 

auditDateABCMHABC - MH (ABS)
10/12/2018497149710
10/13/20182115209718
10/14/20189529520
10/15/2018469946990
10/16/20186251624011
10/17/2018062456245

Hi,

 

You can simply created another measure

 

=IF([ABC - MH (ABS)]>0,"Mismatch","Match")


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I think the issue is my data model date connection, but it seems correct, but obvisouly the table is showing otherwise.

 

Boolean Field data model relationship.PNGBoolean Field.PNG

Hi,

 

Share the link from where i can download your PBI file.


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

Hi,

 

What are Val1 and Val2?  Share the base dataset (in a format that can be pasted in MS Excel).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Use the function ABS() to get the absolute difference.

 

Abs Value Diff = ABS(Value1 - Value2)

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.