Skip to main content
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

Regular Visitor

Measure that computes the difference of a cumulative fact by day

Hey guys,


I have a model to display data from clients' social networks (data from posts on facebook, instagram, etc.). For each social platform, I've a dimension table (that contains basic information of a post, such as created_at date, permalink and so on) and a fact table, that have metrics (such as post impressions, post likes, etc..) with day granularity. The facts in my fact table are all cumulative.


I need to create a measure that computes the total impressions by post by a date range (that could be day, month, quarter, or year). In my mind, I was trying to create a measure that can do somenting like:

impressions = (impressions on last day)  - (impressions on (first day - 1 day) )


Here is a print of my fact table



Can you help my to find a solution for this issue ?




Super User
Super User

@AndreSchuck , with help from date table


This Day = CALCULATE(sum('Table'[impressions_organic]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('Table'[impressions_organic]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('Table'[impressions_organic]), previousday('Date'[Date]))


both column and measure ways are discussed here

Day Intelligence - Last day, last non continous day

@amitchandak  Thanks for the replie.


The solution do not work. I've forgot to mention that the Most Recent date for each post is not same. I've created this query in Dax Studio to better exemplify what I need (in this case is the ImpressionDifference column, so I can just SUM the Impressions diferrence in order to "unaccumulate" the accumulated facts).




I've not been able to reproduce this query in power bi.

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors