Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AnSchmi
Helper II
Helper II

Distinctcount records in fact table not exist in dimension table.

dear communitiy,
I have in my dimension table orders not matching orders in fact table and I would like to show them in a table.
The Relationship is by Order.No. 
I'm trying to calculate the distinct number of orders in fact table not matching the orders in dimension table. 
No of orders with missing order detail records = 

CALCULATE(
    [No of Work Order Header],
    FILTER(
        'd Tbl Items Production Header',
        'd Tbl Items Production Header'[Work.Order.No] not exist in fact table 'f Tbl Items Production Details'[Work.Order.No] 
    )
    )
Can anyone help to understand the logic. 
Thanks a lot 
Andreas
2 REPLIES 2
johnt75
Super User
Super User

Try

No of orders with missing order detail records =
CALCULATE (
    [No of Work Order Header],
    FILTER (
        'd Tbl Items Production Header',
        ISBLANK ( RELATED ( 'f Tbl Items Production Details'[Work.Order.No] ) )
    )
)

Dear johnt75, 
unfortunately this is not working due to following error
The column 'f_Tbl_Items_Production_Details[Work.Order.No]' either doesn't exist or doesn't have a relationship to any table available in the current context. 
There is a link to a very limited extract of my model.
https://fileshare.ssl.iscar.com/data/public/8afb8a 
Would you pls. have a look again on it.
Thanks a lot
Andreas


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.