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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Khomotjo
Helper II
Helper II

Summarize Incremental Data

Hello Everyone,

 

I have data that looks like this :

Khomotjo_0-1739967509776.png

 

I would like to create a table that looks like this :

Khomotjo_1-1739967522117.png

I tried to create a measure like this but I am not getting the correct numbers :

Finalised = CALCULATE(
    COUNT(Orders[Reference]),
    FILTER(ALL(Orders),(TRUNC(Orders[Finalised Date])=TRUNC(Orders[Date]))
)
)
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Khomotjo , hello bhanu_gautam, thank you for your prompt reply!

 

To resolve your issue, verify the following steps:

 

  • Create a Date Table: You could create a date table that contains all possible dates and link it to your data model. Then, you can use this date table to show all dates.

 

DateTable = CALENDAR(MIN('Order'[Finalised]), MAX('Order'[Date]))

 

vyajiewanmsft_1-1740029858125.png

 

  •  Calculation Measure: Calculate the count of orders based on Finalised Date but make sure that for missing dates, you return a 0. Here's a possible DAX solution using a date table:

FinalisedCount = COALESCE(
CALCULATE(
    COUNTROWS('Order'),
    FILTER(
        'Order',
        TRUNC('Order'[Finalised]) = TRUNC(MAX(DateTable[Date]))
    )
),0)
​

Result for your reference:

vyajiewanmsft_2-1740029903298.png

Best regards,

Joyce

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Khomotjo , hello bhanu_gautam, thank you for your prompt reply!

 

To resolve your issue, verify the following steps:

 

  • Create a Date Table: You could create a date table that contains all possible dates and link it to your data model. Then, you can use this date table to show all dates.

 

DateTable = CALENDAR(MIN('Order'[Finalised]), MAX('Order'[Date]))

 

vyajiewanmsft_1-1740029858125.png

 

  •  Calculation Measure: Calculate the count of orders based on Finalised Date but make sure that for missing dates, you return a 0. Here's a possible DAX solution using a date table:

FinalisedCount = COALESCE(
CALCULATE(
    COUNTROWS('Order'),
    FILTER(
        'Order',
        TRUNC('Order'[Finalised]) = TRUNC(MAX(DateTable[Date]))
    )
),0)
​

Result for your reference:

vyajiewanmsft_2-1740029903298.png

Best regards,

Joyce

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bhanu_gautam
Super User
Super User

@Khomotjo 

Here is a revised version of the measure:

Finalised =
CALCULATE(
COUNT(Orders[Reference]),
FILTER(
ALL(Orders),
Orders[Finalised] = Orders[Date]
)
)


This measure counts the number of orders where the Finalised date matches the Date for each row in the Orders table.

 

To create the summary table, you can use the following DAX code:

DAX
SummaryTable =
SUMMARIZE(
Orders,
Orders[Date],
"Finalised", [Finalised]
)
This will create a new table with the Date and the count of finalized orders for each date.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
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.