Forum Discussion

naoyixue1's avatar
naoyixue1
Icon for Post Patron rankPost Patron
4 years ago
Solved

how to summarize one table whose data are from two fact tables

Hey there,   Let me briefly introduce the background as below.   Originally, we only calculate the difference in units and % (production against forecast) as our metrics. But it might mislead us,...
  • PaulDBrown's avatar
    PaulDBrown
    4 years ago

    Ok, see if this works. 

    Count Items w/forecast =
    COUNT ( 'Forecast Fact'[Item] )
    
    Above Forecast =
    COUNTROWS (
        SUMMARIZE (
            FILTER (
                'SKU List',
                [Production] >= [Sum Forecast]
                    && NOT ( ISBLANK ( [Production] ) )
            ),
            'SKU List'[Item],
            'Vendor Lookup'[Vendor]
        )
    )
    

    I've attached the PBIX file