Forum Discussion
DAX code for comparing two tables, and showing the differences - Is it efficient enough?
- 2 years ago
MegaOctane1 Big help. So, why can't you just do this?
SAP_InvoicePartner_DIFFERENCES 3 = VAR __SAP = SELECTCOLUMNS('SAP Invoices', "CustomerNumber", [CustomerNumber], "InvoiceNumber", [InvoiceNumber], "Amount", [Amount]) VAR __InvoicePartner = SELECTCOLUMNS('Partner Invoices', "CustomerNumber", [CustomerNumber], "InvoiceNumber", [InvoiceNumber], "Amount", [Amount]) VAR __SAPExcept = EXCEPT(__SAP, __InvoicePartner) VAR __PartnerExcept = EXCEPT( __InvoicePartner, __SAP) VAR __Result = UNION( ADDCOLUMNS( __SAPExcept, "Kilde", "SAP"), ADDCOLUMNS( __PartnerExcept, "Kilde", "InvoicePartner") ) RETURN __Result
How do i remove recent datasources from a PBIX file before sharing?
I am afraid of sharing recent datasources and credentials
MegaOctane1 Those are not part of the PBIX file. Those items are cached locally on your computer. I run Power BI Desktop on multiple systems. My recent data sources are not the same between them and if I open a PBIX file on another computer, I have to re-establish the credentials.
- MegaOctane12 years agoHelper I
PBIX tile with sample data
Let me know if it works. and if the data is clean 🙂
I would also like your help to create a mesure to count how many customers has difference in the balance. I have only one customer with zero difference. so the answer should be 4...- Greg_Deckler2 years agoCommunity Champion
MegaOctane1 Big help. So, why can't you just do this?
SAP_InvoicePartner_DIFFERENCES 3 = VAR __SAP = SELECTCOLUMNS('SAP Invoices', "CustomerNumber", [CustomerNumber], "InvoiceNumber", [InvoiceNumber], "Amount", [Amount]) VAR __InvoicePartner = SELECTCOLUMNS('Partner Invoices', "CustomerNumber", [CustomerNumber], "InvoiceNumber", [InvoiceNumber], "Amount", [Amount]) VAR __SAPExcept = EXCEPT(__SAP, __InvoicePartner) VAR __PartnerExcept = EXCEPT( __InvoicePartner, __SAP) VAR __Result = UNION( ADDCOLUMNS( __SAPExcept, "Kilde", "SAP"), ADDCOLUMNS( __PartnerExcept, "Kilde", "InvoicePartner") ) RETURN __Result- MegaOctane12 years agoHelper I
Nice, simple, neat - Perfect!!
Thanks Greg_Deckler
One more question: How do i count how many customers doesn't have 0 balance when compared? So i can have this value in a card visual.