Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
For the sake of simplicity, I have a list of stores and sales (see table below). I would like to be able to select a store (via click, slicer, or preferrably drillthrough) and dynamically return a list of other stores with similar sales (for example, plus or minus 10%).
Store_ID | Store_Name | Sales_Last_Year | Sales_plus10perc | Sales_minus10perc |
01 | Main Street | 150 | 165 | 135 |
02 | Elm Street | 140 | 154 | 126 |
03 | Center Street | 125 | 137.5 | 112.5 |
04 | Oak Street | 130 | 143 | 117 |
05 | Central Street | 175 | 192.5 | 157.5 |
06 | Broadway Street | 180 | 198 | 162 |
07 | Pine Street | 120 | 132 | 108 |
Is it possible to use DAX code to write a measure that returns a list of store names or store IDs within the +/- 10% range, based on the store selected using (a) a drillthrough (my preferred option), (b) a slicer list of stores, or (3) by clicking on it in the visual? If not a measure, can I create a calculated table that will change dynamically based on the selection and return the list of similar stores that way? If those don't work, is there another way to efficiently produce a list of observations within a similar range to a selection?
I know that I can create a "Between" slicer for sales and move the slicers to +10% and -10% of the value I want, and a table of stores will narrow to the stores I want. However, I'd like to do this quickly and build in more analysis based on the filtered list.
Solved! Go to Solution.
Hi,
You may download my solution file from here.
Mr. Mathur, you are truly a wizard. I learned much from your posted solution and appreciated the extra functionality you added.
However, is it possible to produce a table that is filtered based on the [Store_Name]s that are similar to the store selected in the slicer? Your code produces an excellent list of similar stores with the CONCATENATEX function, but is it possible to produce an analogous table to the Data table that is dynamically limited to the stores within the selected range from the selected store?
I tried variations on: New Table = FILTER(Data, Data(sales) <= [upper limit] && Data(sales) >= [lower limit])
but I could not change the content of this calculated table with the slicer.
You are welcome. Thank you for your kind words. My objective initially was to produce a Table but i could not do so because in the slicer when we select a Store, the table cross filters and shows the same store. I tried to turn off edit interctions but could not get much success there either. This is the best i could come up with.
Hi,
You may download my solution file from here.
Hi Ashish
Can you share the solution again? The link is broken. I'm trying to create a dynamic list based on a Slicer selection and can't work it out.
Hi,
I do not have that file. Share some data, explain the question and show the expected result.
User | Count |
---|---|
93 | |
87 | |
77 | |
72 | |
67 |
User | Count |
---|---|
116 | |
107 | |
88 | |
65 | |
63 |