previous period
3 TopicsCombine selected value (slicer) with sum for selected period and previous period
Hi, I´m wondering if is possible to combine in one matrix these calculated values. I need something like this: I will be OK with this format too: visual is affected with this slicer: I try to use two measure in one matrix. The first one is: Sum Annualized Booking Value (Selected Year Marker) = VAR SelectedYear = SWITCH( SELECTEDVALUE(general_date_table[Year Marker]), "YTD Marker", YEAR(TODAY()), "1 Year Ago", YEAR(TODAY()) - 1, "2 Years Ago", YEAR(TODAY()) - 2, "3 Years Ago", YEAR(TODAY()) - 3, BLANK() ) RETURN CALCULATE( [Sum Total Contract Value], USERELATIONSHIP(contract_item_history[contract_revision_approved_date], general_date_table[Date]), YEAR(contract_item_history[contract_revision_approved_date]) = SelectedYear ) works perfectly the secont one, doesn´t work with the slicer: _test_Sum Annualized TCV = VAR year_ago = CALCULATE( [Sum Total Contract Value], FILTER( contract_item_history, YEAR(contract_item_history[contract_revision_approved_date]) = YEAR(TODAY()) - 1 ) ) VAR two_years_ago = CALCULATE( [Sum Total Contract Value], FILTER( contract_item_history, YEAR(contract_item_history[contract_revision_approved_date]) = YEAR(TODAY()) - 2 ) ) VAR three_years_ago = CALCULATE( [Sum Total Contract Value], FILTER( contract_item_history, YEAR(contract_item_history[contract_revision_approved_date]) = YEAR(TODAY()) - 3 ) ) VAR four_years_ago = CALCULATE( [Sum Total Contract Value], FILTER( contract_item_history, YEAR(contract_item_history[contract_revision_approved_date]) = YEAR(TODAY()) - 4 ) ) VAR _selected_year = SELECTEDVALUE(general_date_table[Year Marker]) RETURN SWITCH( TRUE(), _selected_year = "YTD Marker", year_ago, _selected_year = "1 Year Ago", two_years_ago, _selected_year = "2 Years Ago", three_years_ago, _selected_year = "3 Years Ago", four_years_ago, "N/A" ) I tried a simple one too, but doesn´t work neither: _test Sum for Previous Year = CALCULATE( [Sum Total Contract Value], FILTER( contract_item_history, YEAR(contract_item_history[contract_revision_approved_date]) = SWITCH( SELECTEDVALUE(general_date_table[Year Marker]), "YTD Marker", YEAR(TODAY()) - 1, "1 Year Ago", YEAR(TODAY()) - 2, "2 Years Ago", YEAR(TODAY()) - 3, "3 Years Ago", YEAR(TODAY()) - 4, BLANK() ) ) )<p><br />Any idea why is not working and how to fix it?<br /><br /></p><p> </p><p>Thanks a lot in advanced<br />Sona</p>452Views0likes1CommentReturn previous months range when multiple months selected
How do I return the [_Inc Count] for the equivalent number of previous months based on the months the user selects (whether that is 1 or more)? Details: I have a previous month formula as follows: _Inc Count PM = CALCULATE('Incidents'[_Inc Count], PREVIOUSMONTH('DATE Table'[Date])) which shows me the number of tickets from the month prior to whatever month they selected (from a filter showing a list of MMM-YYYY) if they select only 1 month. But, if the user selects more than 1 month, how do I return the [_Inc Count] for the previous equivalent number of FULL months? For example, if the user selects April-2022 and March-2022, I need to return the count for ALL of Jan and Feb (they selected 2 months so I need the two months before that range). If they select Jan, Feb and March, I need it to return Oct, Nov and Dec. I have a previous period formula that returns the equiv number of days but in this case, I need it to return full months even if one of the months selected is only thru the 4th or whatever. Please help?Solved2KViews0likes3CommentsChoose data, display current week data as well as previous week
Hi Guys, based on a selected date (week) in a slicer (SlicerWeek), I want to display in a table the value of the week, as well as the previous week value. The columns of the table contain the date, formatted as week. There is a date table, linked to a fact table. In the screenshot you can see the desired result of the table, but I want to select only one week in the Week Slicer and display tow weeks data (there are other visuals that show only the current week value). Regards, Toddy875Views0likes4Comments