Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Comparing two tables that has blank values

Table1 Venue Code Venue Name Customer Code Laguna Suria 101Suria Laguna Suria 102Suria Laguna Suria 103Suria Laguna Suria 104Suria Laguna Suria GENSURIA Laguna Suri...
  • edhans's avatar
    4 years ago

    I would take a different approach. Use the Model in Power BI for this. It returns this:

    I set up a model using the Venue codes from both tables:

    That lets me do this:

    I have 3 measures:

    Table 1 Records = COUNTROWs('table')
    
    Table 2 Records = 
    CALCULATE(
        COUNTROWS('Table 2'),
        NOT ISBLANK('Table 2'[Customer Code])
    )
    
    Difference = [Table 1 Records] - [Table 2 Records]

    The difference measure goes in the filter pane and is not zero.

     

    My file is here. Try to use Power BI the way it is intended - it expects a Star Schema, not a a SQL database where you are running queries on disconnected tables.


    Microsoft Guidance on Importance of Star Schema