March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 ?
Thanks.
@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
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
@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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |