Forum Discussion
Anonymous
3 years agoNot applicable
Dax Comparing Two Columns From Different Tables Returning Incorrect Result
Hi, I have this dax function that is returning incorrect result for Feb 2023 when counting the number of barcodes that are not present in table 2 when comparing to table 1. Appreciate any help please...
- 3 years ago
Anonymous
Is this what you're looking for?Count of Missing Barcodes = COUNTROWS ( EXCEPT ( VALUES ( 'DistProfile v1-3'[Barcode] ), CALCULATETABLE ( VALUES ( 'DASHBOARD_RESULTS_HIST (2)'[BARCODE] ), ALLEXCEPT ( AcceptanceCalendar, AcceptanceCalendar[Year] ) ) ) )
BrianConnelly
Resolver III
3 years agoIf you remove the NOT from the formula, this counts the ones that are blank which is 1471. Also, rewrote based on the calculated column as
No Barcode Match = COUNTAX(FILTER('DistProfile v1-3',(ISBLANK('DistProfile v1-3'[Barcode Found In History])=TRUE())),'DistProfile v1-3'[Barcode])with same 1471
Anonymous
3 years agoNot applicable
BrianConnelly wdx223_Daniel thank you for your feedback. But after doing a quick analysis in Excel of the same dataset filtered for 2023 only, I came up with 1441 for Feb and 193 Jan which total 1634. All the numbers match in Excel vs Power Bi except for Feb. Am I missing something?
Excel file fyi⬇️
https://docs.google.com/spreadsheets/d/1duPWwIRiwhof_CK-7X-avZKztMaA_Vjb/edit?usp=share_link&ouid=106267973063939566544&rtpof=true&sd=true