Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
111 | |
108 | |
108 | |
93 | |
61 |
User | Count |
---|---|
169 | |
138 | |
135 | |
102 | |
86 |