We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I would like a calculated Field to produce the "Type" field below in this context.
Date | Val1 | Val2 | Abs Value Diff | Type |
| 1/1/2018 | 5 | 4 | 1 | Mismatch |
| 1/2/2018 | 5 | 5 | 0 | Match |
| 1/3/2018 | 5 | 6 | 1 | Mismatch |
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:
| auditDate | ABS Value Diff | Type |
| 1/1/2018 | 0 | Match |
| 1/1/2018 | 1 | MisMatch |
| 1/2/2018 | 0 | Match |
| 1/2/2018 | 0 | MisMatch |
| 1/3/2018 | 0 | Match |
| 1/3/2018 | -1 | MisMatch |
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
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?
| auditDate | ABC | MH | ABC - MH (ABS) |
| 10/12/2018 | 4971 | 4971 | 0 |
| 10/13/2018 | 2115 | 2097 | 18 |
| 10/14/2018 | 952 | 952 | 0 |
| 10/15/2018 | 4699 | 4699 | 0 |
| 10/16/2018 | 6251 | 6240 | 11 |
| 10/17/2018 | 0 | 6245 | 6245 |
Hi,
You can simply created another measure
=IF([ABC - MH (ABS)]>0,"Mismatch","Match")
I think the issue is my data model date connection, but it seems correct, but obvisouly the table is showing otherwise.
Hi,
Share the link from where i can download your PBI file.
Hi,
What are Val1 and Val2? Share the base dataset (in a format that can be pasted in MS Excel).
Use the function ABS() to get the absolute difference.
Abs Value Diff = ABS(Value1 - Value2)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 37 | |
| 32 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 39 | |
| 34 | |
| 25 |