selected value
6 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>453Views0likes1Commentget minimum of selected slicer column values, in a table showing the selected column.
slicer: yearmonth selected: 2023-09 and 2023-10 table yearmonth | salesvalue 2023-09 | 1234 2023-10 | 4321 what I want to add is the accumulated sales in the selected period. table yearmonth | accum.sales 2023-09 | 1234 2023-10 | 5555 for this I need the minimum and maximum of the selected slicer values, to get the filter in dax: yearmonth >= MinYearMonth, yearmonth <= MaxYearMonth. How to get the Min and MaxYearMonth? Because in the table itself the selectedvalue of yearmonth becomes the single value of the line in the table: either 2023-09 of 2023-10, not both. Thanks!Solved1.3KViews0likes2CommentsPrevious User Selected Value
I don't think this is possible, but I thought I'd ask here in case I'm missing something. Imagine a scenario with a table that has a single column called Item. In this column are the values A-E. Item is used in a slicer. I would like two measures: [Selected Item] and [Previously Selected Item]. The DAX for [Selected Item] is simple. In this example, if the user were to select the slicer option "D" and then subsequently change the selection in the slicer to option "B", is it possible to set up [Previously Selected Item] to return "D"? As far as I know, there is no history of the filter context, but I wouldn't be surprised if there was some some set of functions out there that would allow for this. See the below screenshot for the desired result in the scenario described above:Solved505Views0likes1CommentAuto-Select Slicer Value
I have a table that contains a list of people similar to below: Name Email Sally Jones [email protected] Ed Smith [email protected] Jose Perez [email protected] Juanita Clark [email protected] Karen Falk [email protected] Marcel Thompson [email protected] Alan Ames [email protected] I have a slicer (drop down) visual that I can use to show the list of people (Sally, Ed, Jose, etc.) and what I'd like to do is have the slicer (when report is accessed/loaded) change to who ever is accessing it but still allow the ability to select another person if need be. So for instance if Karen is accessing the report the drop down will automatically show her name however if she wanted to look at the information for another associate, she could click the drop down arrow and select anyone else she wants (Alan, Marcel, Juanita, etc.) I was able to determine who is logged in/accessing the report by using the following dax ( loggedIn = USERPRINCIPALNAME() ), however I haven't been able to find anything that would allow me to be able to automatically select the userprincipalname for the slicer. For instance when Jose loads the report, loggedIn shows [email protected] and I can't figure out how to make the slicer changed from the first value in the table ([email protected]) to my variable (loggedIn). Does anyone know if this is possible or a work around that could accomplish what I'm looking to do? Any / all help that can be provided would be much appreciated, thanks. Regards, Cody1.1KViews0likes2CommentsHow can I create a calculated column that calculates the running total of the last 13 periods?
This table contains several rich identifiers that should be took in consideration when calculating the running total. Should I create a calculated column or a measure? The thing is that when creating the measure, and adding it to a matrix, slicers dont work if I want to only see information for a specific country. If I apply a filter by country the measure shows the values for all rows with the country selected, and the other countries show the sum of the entire table, and still appear in the table instead of dissapearing. I have a week column identifier, and I added an index column to enumerate each column them. This is the code I was using for the measure, so the current week and the previous weeks can have their own running total taking in consideration the previous 13 weeks. Sum of 13 Previous Weeks Total Units = CALCULATE([Sum of Total Units], FILTER(ALL('Table1'), 'Table1'[Index]=SELECTEDVALUE('Table1'[Index]) || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+1 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+2 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+3 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+4 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+5 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+6 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+7 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+8 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+9 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+10 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+11 || 'Table1'[Index]=SELECTEDVALUE('Table1'[Index])+12 && 'Table1'[Country]= SELECTEDVALUE('Table1'[Country]) && ..... (repeats for each rich identifer) )) Thank you in advance for the guidanceSolved990Views0likes3CommentsCorrectly calculate last 12 month value from YTD
Hi, I have calculated Inventory Value (only YTD) for every month in 2018 and 2019. For example, in end of January 2018 we have 1 mln EUR, in end of February 2018 1,5 mln EUR etc... Now, I need to sum inventory value from last 12 month for every month in 2019. Is it possible to take value for particular month, e.g. January 2018 and sum with February January 2018 etc? In other words, 01.18 - YTD Val - 1 mln, 02.18 - YTD Val-2 mln, ...., 12.18- 1,5 mln. And I want to sum it. Maybe use SELECTED VALUE or something like that?3.2KViews1like10Comments