snapshot
8 TopicsCreating a Snapshot table for larger datsets
What is an efficient way to create a snapshot table in Power BI for large datasets? I have a Referrals table and an Appointments table, linked by RefID. I need to generate a monthly snapshot showing referrals that had at least two completed appointments, where both appointments were completed on or before the end of each respective month.Solved1.1KViews0likes6CommentsWrong Totals in aggregation snapshot tables
Guys, I need your help. I'm stacking up 2 snapshot tables, and, besides I'm using sumx with some help of copilot, I'm getting the wrong totals. I'm trying to get the right numbers of enrollment for each period of time based on CICLO column. Here is an example of this table, DATA_MATRICULA is primarykey to datatable: DT_EXECUCAO_AGG| MAT_LIQ| CICLO| DATA_MATRICULA 20/05/2025 1 20242 10/05/2024 20/05/2025 3 20242 11/05/2024 20/05/2025 5 20242 12/05/2024 20/05/2025 0 20242 13/05/2024 20/05/2025 9 20242 14/05/2024 20/05/2025 9 20242 15/05/2024 20/05/2025 30 20252 10/05/2025 20/05/2025 10 20252 11/05/2025 20/05/2025 1 20252 12/05/2025 20/05/2025 3 20252 13/05/2025 20/05/2025 5 20252 14/05/2025 20/05/2025 1 20252 15/05/2025 04/06/2025 0 20242 10/05/2024 04/06/2025 1 20242 11/05/2024 04/06/2025 3 20242 12/05/2024 04/06/2025 5 20242 13/05/2024 04/06/2025 2 20242 14/05/2024 04/06/2025 2 20242 15/05/2024 04/06/2025 1 20252 10/05/2025 04/06/2025 0 20252 11/05/2025 04/06/2025 20 20252 12/05/2025 04/06/2025 5 20252 13/05/2025 04/06/2025 1 20252 14/05/2025 04/06/2025 1 20252 15/05/2025 Here some example of what I want to show RĂ³tulos de Linha 20242 20252 Total %YoY Campus 13 62 75 377% Polo 27 16 43 -41% Total Geral 40 78 118 95% This measure is looking to get the quantity of enrollment from the same period of the last year, but I used a fixed timeslap 365 days back. Sum MAT_LIQ_AA_YTD_Foto_D-1 = VAR CicloPassado = CALCULATE(MAX('f_MYTABLE_252'[CICLO])) - 10 VAR MaxExecucao = CALCULATE(MAX('f_MYTABLE_252'[DT_EXECUCAO_AGG])) RETURN SUMX( VALUES(d_Datatable[Date]), VAR DataContexto = d_Datatable[Date] VAR DataDeslocada = DATEADD(d_Datatable[Date], -IF(DataContexto < DATE(2025, 03, 01), 366, 365), DAY) VAR MaxData = CALCULATE(MAX(d_Datatable[Date]), ALL(d_Datatable)) RETURN IF( DataContexto <= MaxData, CALCULATE( SUM('f_MYTABLE_252'[MAT_LIQ]), 'f_MYTABLE_252'[CICLO] = CicloPassado, 'f_MYTABLE_252'[DT_EXECUCAO_AGG] = MaxExecucao, d_Datatable[Date] = DataDeslocada ), BLANK() ) )Solved945Views0likes5CommentsSnapshot data: Newsletter subscriptions per person (or newsletter) (or total) over time
Hello there. RE: https://michellepace.com/pics/snapshot.pbix Goodness how I struggle with DAX. Can someone please help me with a DAX measure to calculate the number of newsletter subscriptions? Below in the blue box, are all the details of my data. The pink shows the measure I have tried (but it only seems to work if I select ONE subscrip_id). Basically, if I am standing on a given date (eg 20 August) for a given subscription X, then I think the DAX needs to look back through time to the last row of data for subscription X (eg 15 August). If The subscription isOn for the 15th of August, then it is on and counted as a subscription for the 15, 16, 17, 18, 19, 20 August. But of course there is only one subscription count. That is the only way I can imagine solving this... but just how to take my words and put them in DAX is quite... well beyond me right now. Thanks very much in advance, MichelleSolved1.2KViews0likes5CommentsFinding Change in Start Date Between Snapshots
Hello, I've been trying to create a calculated column in my workbook that calculates the change in start date for each Activity ID since the last snapshot was taken. Snapshots are taken on the first of every month, and activities could move forward, backward, stay the same, be completed or cancelled, or be newly added in each snapshot. I can't figure out how to create this formula in DAX, so I was wondering if someone would be able to help me out? I've included a sample image of what I'm going for below with the highlighted column being the one I'm trying to create. I really appreciate any help anyone can offer!Solved1KViews0likes4CommentsDAX Comparing counts from two different snapshots
Hi all, This should be quite straightforward, but I can't seem to be able to debug it yet... I have a series of data called 'Opportunities' that are recorded in an excel spreadsheet. Opportunities Opportunity 1 Opportunity 2 Opportunity 3 Opportunity 4 ... Every week, we capture a snapshot of the list and assign a date in the 'Date Captured' column. Date Captured Opportunities Projects 10/02/2022 Opportunity 1 Opportunity 10/02/2022 Opportunity 2 Opportunity 10/02/2022 Opportunity 3 Opportunity 17/02/2022 Opportunity 1 Opportunity 17/02/2022 Opportunity 2 Opportunity 17/02/2022 Opportunity 3 Opportunity 17/02/2022 Opportunity 4 Opportunity 24/02/2022 Opportunity 1 Opportunity 24/02/2022 Opportunity 2 Opportunity 24/02/2022 Opportunity 3 Opportunity 24/02/2022 Opportunity 4 Opportunity 24/02/2022 Opportunity 5 Opportunity What I would like to have is a summary table with the latest number of opportunities (5), a dynamic table that shows the difference between the current/latest number of Opportunities and a previous date (selected using a slicer of the 'Date Captured'), and a table that shows the number of Opps for that previous date (3). Latest Date Count 24/02/2022 5 Difference 2 Earlier Date Count 10/02/2022 3 I have written the following codes, but I keep getting 0s in the middle table (difference). Any help? Step 1: Opportunties_Count = CALCULATE (COUNT('Table'[Projects]), FILTER('Table',[Projects]="Opportunity")) Step 2: LatestDateCount = VAR LatestDate= MAX ('Table'[Date Captured] ) VAR LatestDateCount= CALCULATE ( [Opportunities_Count],'Table'[Date Captured] = LatestDate) RETURN CALCULATE(LatestDateCount) Step 3: EarlierDateCount = VAR EarlierDate= SELECTEDVALUE('Table'[Date Captured] ) VAR EarlierDateCount= CALCULATE ( [Opportunities_Count],'Table'[Date Captured] = EarlierDate) RETURN CALCULATE(EarlierDateCount) Step 4: Difference = LatestDateCount - EarlierDateCount Please note that I do get the right values in the top and bottom tables. The only one that doesn't seem to work is the Difference table.Solved2KViews0likes4CommentsSnapshot Fact with complex filters
Hi, I am having a situation similar to "Snapshot fact table" but with a bit of complexity. Please bear with me as I explain. I have a number of Customer IDs having unique Sale value. After the creation of any customer, At any given date, one customer sits in one stage. It can jump from one stage to another on any date. We have several stages. The table that I have just notes the date of jump, if any, for any customer id. So the new customers gets added(and they have a default initial stage called "B" ) and they can jump from one stage to another at any coming dates. What I want to create is a DAX formula which can sum up the sale values at any given date (the date might not be in the table below as it just notes the date of change of stages) for only specifc stages(for example stage- CC, IDP). So, if the user selects any date in reports, say he selects 20th Feb 2021, the dax sees what all customers have been in the table before and at this date, filters all the customers with stage - CC and IDP and sums up the sale values and give as a result. Please see table below: Cust Id Stage Date Sale Value ACC-00000016-SOS ST 8/11/2020 124293 ACC-00000016-SOS B 8/01/2020 124293 ACC-00000058-SOS DP 5/11/2020 194559.47 ACC-00000058-SOS NA 19/06/2020 194559.47 ACC-00000058-SOS IDP 3/12/2020 194559.47 ACC-00000058-SOS CB 16/12/2020 194559.47 ACC-00000058-SOS PP 13/07/2020 194559.47 ACC-00000058-SOS CB 19/06/2020 194559.47 ACC-00000058-SOS CB 12/06/2020 194559.47 ACC-00000058-SOS B 8/01/2020 194559.47 ACC-00000142-SOS CB 13/06/2020 42232.62 ACC-00000142-SOS CB 10/06/2020 42232.62 ACC-00000142-SOS CB 8/11/2020 42232.62 ACC-00000142-SOS NA 23/06/2020 42232.62 ACC-00000142-SOS CB 22/06/2020 42232.62 ACC-00000142-SOS NA 11/06/2020 42232.62 ACC-00000142-SOS NA 17/06/2020 42232.62 ACC-00000142-SOS B 8/01/2020 42232.62 Any help will be highly appreciated. Thanks, Rahul.1.6KViews0likes2CommentsReturn earliest value of a boolean/text value based on snapshot dates
Hi guys, I've been banging my head against this challenge for a little over a week now, so I was hoping some of you smart people can help out! I have seen solutions relating to numerical values for snapshot comparisons that seem to work, but I can't figure out how to convert that when it's a boolean/string. So I've got a Snowflake schema in my data model view in Power BI. My company is also using daily snapshots of the data so we can follow the progress over time. This especially relates to our forecasts. We have a boolean field that denotes whether we expect to order to come through or not. When we sum up the expected orders with a snapshot date at the beginning of the month, this number will change throughout the month because orders are moved in and out of the expected field. To easily surface and investigate what those moved orders are, I would like to give the user a comparison period slicer to chose and show them the expected deals along with deals that were changed. In terms of the slicer (having a relative date slicer or two separate slicers) I'm open to suggestions. I've tried creating calculated columns showing the expected value at the first snapshot date (having a relative date slicer on snapshot date or two different slicers - one for a inactive relationship snapshot date dim and one for an active), but with no success because I can't get it to return the expected field in a CALCULATE function based on my conditions (USERELATIONSHIP to an inactive snapshot date dim, ALL(snapshot date dim) from primary relationship. I would really appreciate any help! Edit: I've added the data model and an example of the data and desired output This is my essentially the desired output based on a snapshot date filter between 1-4. Expected start would show what the expected value is at the start period selected regardless of what snapshot date we are looking at now. Snapshot Date Record Expected Expected Start 01-01-2020 aaaa TRUE TRUE 02-01-2020 aaaa TRUE TRUE 03-01-2020 aaaa FALSE TRUE 04-01-2020 aaaa FALSE TRUE 01-01-2020 bbbb FALSE FALSE 02-01-2020 bbbb TRUE FALSE 03-01-2020 bbbb TRUE FALSE 04-01-2020 bbbb TRUE FALSE Hopefully that's enough to go by otherwise I'm happy to add more!874Views0likes2CommentsSales amount previous week (snapshot)
Hi, everyone I hope someone can help me I include the image to explain what I want to do. I would like to show how sales amount have been increased every month per week. To do that, I have tried to create a measure with this phormula. Sales amount last week = CALCULATE(SUM('Sales'[Sales amount]);FILTER(DimTable;DimTable[WeekCount]-1)) However, when I include the measure in the table, the result is the same than Sales Amount current week. Does anyone know how can I do that?. Thanks,Solved25KViews0likes6Comments