slicers
30 TopicsRemoving a slicer interaction while still using the slicer value
In my report, a user will select a date using a date between slicer and we're only using the minimum date selected. This date can be any day of the week. I want to show the sales numbers for the entirety of that week. For example, if a user selects a Wednesday, I want to show the values for Sunday through Saturday of that week. I have tried several remedies, but it seems like I either show the days leading up to the selected day or the days after the selected day-- I have not been able to see the entire week at once. One attempt of a calculation was CALCULATE(sum(*redacted sales table info*),ALL('vw_D_Date'[date_value]),FILTER(*redacted sales table*,[MinimumSelectedDate])) where MinimumSelectedDate = FIRSTDATE('vw_D_Date'[date_value]) Any suggestions on how to solve this?Solved710Views0likes2CommentsCalculated Values in a Chart
Below is a table that I built in SQL using a cross join for each customer visit-priorService, where we provide an "as of" list of prior services done for each customer visit to a store. At visit 1, customer A has only one prior high-level service done on 1/1/2006. At visit 2, that same customer has two prior services done, S1 high and S2 medium. Finally, at visit 3, that same customer has four prior services done, S1, S2, S3, and S4. It is possible for a customer to have no prior services done, as indicated by customer D. This table is only part of a star-schema where my dashboard is centered on visits, so an entry in this table NEEDS to be recorded for each visit in the table below to identify that that visit for customer D is associated with 0 prior services. Each prior service has a severity and date (as well as other fields not listed in the table I have already created below). "Priors" Table: Customer VisitID Visit Date PriorServiceID PriorServiceDate PriorServiceSeverity A V1 1/1/21 S1 1/1/06 High A V2 6/1/21 S1 1/1/06 High A V2 6/1/21 S2 3/1/21 Medium A V3 8/1/21 S1 1/1/06 High A V3 8/1/21 S2 3/1/21 Medium A V3 8/1/21 S3 7/15/21 Low A V3 8/1/21 S4 7/17/21 Medium B V5 7/1/22 S5 1/1/01 High B V5 7/1/22 S6 1/10/01 Medium C V6 1/1/21 S7 1/1/98 Medium C V6 1/1/21 S8 6/1/05 Low C V7 9/1/21 S7 1/1/98 Medium C V7 9/1/21 S8 6/1/05 Low C V7 9/1/21 S9 1/1/21 High D V8 10/1/21 NULL NULL NULL The dashboard I've created has slicers on visit date, prior service date, and prior service severity. I want to chart with the # of FILTERABLE prior services on the x-axis, and the number of visits on the y-axis. To achieve this, I initially built the following summary table separately in my data model. Priors Counting Table = SUMMARIZE( 'Priors', Priors[VisitID], "PriorVisitCnt", DISTINCTCOUNTNOBLANK( 'Priors'[PriorServiceID] ) + 0 ) I linked this to my main visit-level table using the VisitID and got the chart I wanted, but the chart becomes meaningless when I filter on the service date or service type. Without any restrictions, there are upto 190 prior services done for a customer, but we need to see only the prior services done in 2017 when I filter on that service year for instance. It still shows 190 when I select 2017 on the slicer because there is a customer who had a grand total of 190 visits between 2000 (the oldest service recorded) and 2024 whose total amount of services keep showing. Based on my review of similar posts on this forum, it looks like measures can't be thrown into charts so easily but there COULD BE a workaround through calculated columns? I'm struggling a lot on this to even get the count of prior services per EACH visit on a measure to begin with. I already report on the min, max, median, and mean number of prior services done as of each visit for a customer, and it's very easy using a measure such as below. So I'm HOPEFUL something like this can be done at the chart-level? Median = VAR Summary = SUMMARIZE('Priors', Priors[VisitID], "PriorVisitCnt", DISTINCTCOUNTNOBLANK( [PriorServiceID] ) + 0 ) RETURN MEDIANX ( Summary, [PowerBICnt] )Solved1.1KViews0likes5CommentsHow to use different column value if slicer has selected value
My fact table is created like this: Date Carrier Score 1/1/2024 A 1 1/2/2024 A 0.98 1/3/2024 A 0.95 1/1/2024 B 0.98 1/2/2024 B 0.95 1/3/2024 B 0.9 I have a single dimensional table like this: Carrier Carrier Hide A Carrier 1 B Carrier 2 There is a single slicer which uses the [Carrier] value from the dimensional table. I'm wanting to create some functionality within the report that if someone selects a [Carrier] value, then it will return that [Carrier] value for that specific row, but will return the corresponding [Carrier Hide] value for each other row. I'm attempting to obfuscate non-selected rows with a different value if they are not selected, but leave the rows in place within the visual itself. So, if no slicer values are selected, it would return [Carrier]. If [Carrier] "A" is selected, it would return "A" for one row and "Carrier 2" for the next row, since [Carrier] "B" was not selected. Any help/advice would be greatly appreciated!Solved1.1KViews0likes4CommentsImpacting related slicers with DAX
Hello, I have following data model (fixed, cannot used both direction filters that solves my issue ) And my goal is to create report with 2 slicers (date and location) with condition that one slicer will involve second one (keep condition that current data model fix) so if I will choose range of values, then range of location will be also changes (based on the date range) I tried to put DAX field into location slicer, but it doesnt help, my guess was something like that: SlicerDate = CALCULATETABLE(Location, USERELATIONSHIP(Sales[ID_Date],'Date'[ID])) but getting error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value." so may 2 questions 1) is it possible calculate dax measure and then assign it for slicer ? 2) If yes, what s the correct formula ? If no why I got this error it weird when calculatetable doesn t return table thanks !!!880Views0likes3CommentsCan the Filter Function be used with Slicers?
Hi all, I have a report I'm developing and it works for company level but not when I want to use a slicer to investigate by depot/location. The background is as follows. "Sales" is direct calculation based on our weekly import and is working as expected. "Last Year" is a Dax expression: Calculate( SUM(Imports[SALES]), Filter( ALL(imports), Imports[Week No] =MAX(Imports[Week No])-100 ) ) So I've added a slicer to this sheet in order to restrict data to "Manchester" but what happens is the sales value as per the imports works fine, but the DAX expression doesn't incorporate the silcer and continues to show the Last Year value for the full company, (Note: I know there is a time inteligence function for "This Time Last Year" but this won't work with our current data.) So my question is, are Slicers and DAX expressions compatiable or do I need to change my use of the filter function? The solution needs to allow for other depot/location data to be selected in the slicer. For example, Should we switch the slicer from Manchester to London, I need the outcome of the DAX expression to update automatically and in accordance with the slicer. I look forward to hearing a response and developing my user of the filter function, thanks in advance. Regards, Chris867Views0likes3CommentsMaking measures selectable in slicers
Dont know if this is posted anywhere but I had trouble finding it - If you want to make a slicer displaying measures from which you select you can do the following by creating a table: MeasureList = { ("Agree", NAMEOF('MainMeasures'[Agree]), 1), ("Disagree", NAMEOF('MainMeasures'[Disagree]), 3), ("Neutral", NAMEOF('MainMeasures'[Neutral]), 2), ("Strongly Agree", NAMEOF('MainMeasures'[Strongly Agree]), 0), ("Strongly Disagree", NAMEOF('MainMeasures'[Strongly Disagree]), 4) } Create a table using the above syntax the first bit is what appears in your slicer, the second bit is your measure table and measure name and the third bit is the order you want them to appear in. One created you add this to a slicer. Anyway - hope this is useful to somebody.662Views2likes2CommentsPass slicer date range to a variable
I am having trouble passing a slicer date range to a variable. I have two tables: 1. Before_Day_Key is used for my before slicer 2. After_Day_Key is used for my after slicer I have created variables that create the min and mix date for each of the slicers. Now I want to create a variable that has the date range of each slicer. What I am expecting is: VAR _periodBefore: 01/17/2023 - 03/20/2023 VAR _periodAfter: 03/28/2023 - 05/29/2023 Before_Day_Key table is here. After_Day_Key table is here. Can you help complete the statement: PED2 = VAR _minDateBefore = MIN('Before_Day_Key'[Business Date]) VAR _maxDateBefore = MAX('Before_Day_Key'[Business Date]) VAR _minDateAfter = MIN('After_Day_Key'[Business Date]) VAR _maxDateAfter = MAX('After_Day_Key'[Business Date]) VAR _periodBefore = VAR _periodAfter =Solved2.2KViews0likes6CommentsMultiplying interactive slicers with columns.
Dear, I am looking to develop a power bi for our sales department for them to show the TCO for end customers. The benefit of buying a higher efficiency class. Power*Company cycle ...hoursperday*day in a year......* Energiecost.....(money/kWh)..... * difference in efficiency % |vs| Cost IE4-IE3. The problem is the energycosts per hours in a year. Power and efficiency are in a column. Hours per day, days in a year and energy cost are interactive slicers. I starting to believe this is not possible. Any tips? Im starting to lose hope.756Views0likes3CommentsFormatting for active slicer
I have a number of slicers on a page, many of them need to be drop down type, and it would be helpful to give the user some kind of feedback that a particular slicer is active. I'm trying to make the background vary using a measure (adding a green tinge if the slicer is being used). Is there a measure that I can use to detect if the slicer is actively being used? ISFILTERED is only working if there is another filter acting on it from externally IF(ISFILTERED('Regions'[Region]), "rgba(192,255,255,0.2)", "rgba(255,255,255,0.2)" ) I also tried SemiTransRegion = VAR OptionsCount = COUNTROWS(ALLSELECTED('Regions'[Region])) VAR SelectedCount = DISTINCTCOUNTNOBLANK('Regions'[Region]) RETURN IF(OptionsCount <> SelectedCount, "rgba(192,255,255,0.2)","rgba(255,255,255,0.2)") I'm not even sure if each of these VAR is evaluating to "all options" or "selected options", since I can't see their values within the same slicer visual, and if I return the colour and the VAR in separate measures in a table, they do not change in the same way as they must be in the slicer, as I get results in the table that should be useful.Solved535Views0likes1CommentUse slicer to filter column
I want to use my quarter year column as a slicer, when I select a single quarter year, the resulting outcome in the matrix table should give me the output as 'Selected quarter from the slicer and next two quarters' as shown in the below image. Can someone suggest any method or know the proper DAX for the following outcome?Solved1.3KViews0likes4Comments