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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
liselotte
Helper I
Helper I

Add missing dates with 0 in DAX

I extract the original table 'org_table' with the following query

table =
    SELECTCOLUMNS(
        FILTER(
            'org_table',
            'org_table'[Type] = "H" &&
            'org_table'[Date] < TODAY()
        ),
        "Place", 'org_table'[Place],
        "Factory", 'org_table'[Factory],
        "Device", 'org_table'[Device],
        "Value", 'org_table'[Value],
        "Date", 'org_table'[Date]
    )

 

which resulted in this table 

liselotte_0-1718293644488.png

 

How can I change the query so that the resulted table are added missing dates from 01/01/2024 to today with Value=0 for each combination of Place, Factory and Device? Because this is just the simplified version of my problem, I would like to do it in DAX so that I can it in my real query. Thank you.

2 REPLIES 2
Anonymous
Not applicable

Hi @liselotte ,

 

How do you make sense of adding the results table with missing dates from January 1, 2024 to today and Value=0 for each combination of locations, plants, and equipment?

 

Best Regards,
Adamk Kong

Hi @Anonymous , thank you for replying. I mean I want to get a table resulted from LEFT JOIN on columns ['Date'] of Table CALENDAR(DATE(2023,01,01), TODAY()) and the table in the provided query, I know I can do it with Power Query, but for my real problem, I would like to do it in DAX, which I need help with.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.