Hello All,
I have a scenario. Below you will find a visual of what I am facing.
What I would like is for one line to show, and the rest to populate when a selection is made with a slicer.
I have two slicers, year and month.
Year slicer contains:
Month slicer contains:
beyond that, I am only using one key measure to display the % shown on the visual:
Is there a way I can just display one line on the visual and the rest remain hidden until a selection is made?
All the help is greatly appreciated.
Thank you!
-Cody
Solved! Go to Solution.
This should give you what you want - and it will even work with a single extra year too (sorry for the extra work on the sample data). I had forgotten about ISFILTERED().
use measures, one for each line, and set the measure result to BLANK() for the lines you want to hide.
Would I use if selected logic to create the measure?
All the help is greatly appreciated.
Thank you!
You would use ISFILTERED or compare with FILTERS .
Hello,
would you mind providing a brief example of what one measure would look like? I was trying to figure it out myself and haven't been able to.
all the help would be greatly appreciated.
thank you!
Please provide sample data in usable format (not as a picture - maybe insert into a table?) and show the expected outcome.
I have provided a sample from the dataset I am using. the expected outcome would be to only show one year as a baseline (can be any year) and have it that no other years show until selected on the slicer.
the best basline I can provide is with the picture with my initial post. You will notice it is already very cluttered and it has been asked to show only one year until others are selected.
I appreciate all of your help.
Thank you.
So you would like to make 2019 the baseline and only show 2020 data as well if that year is selected? And the baseline year should not be deselectable?
By the way, there's a small issue in Power BI. When nothing is selected in a slicer, everything is selected. That means a slicer with a single value will always have that value selected, regardless of the toggle. That means in addition to the baseline we would need at least TWO other years.
attached file for illustration
So there is no way to have it only show one year and when the user wants to view other years / compare, they can use the slicer to populate them?
That's not what I said. There is no way to show one year and then use a slicer to show one other year if that is the only other year available. It will work with two or more additional years.
For the sake of example, could I see how you did it again, but this time I have provided 3 years. I apologize in advance for the confusion and appreciate all of the help you have provided.
Thank you so much for your help. This is exactly what I envisined.
So I can just keep on adding years and the funcitionaly will remain the same?
Thank you!
Yes. one thing to consider is that the baseline year right now is hardcoded in Power Query. Not sure if that's what you want going forward.
Year | Month | Virally Suppressed Total | Virally Suppressed Count Total | Undetectable Total | Undetectable Count Total | Month Number | Viral Suppression % | Not Virally Suppressed Total | Not Virally Suppressed % | undetectable % |
2020 | January | 1213 | 1326 | 996 | 1326 | 1 | 91.48% | 113 | 8.52% | 75.11% |
2020 | February | 1237 | 1346 | 1011 | 1346 | 2 | 91.90% | 109 | 8.10% | 75.11% |
2020 | March | 1249 | 1352 | 1013 | 1352 | 3 | 92.38% | 103 | 7.62% | 74.93% |
2020 | April | 1248 | 1358 | 1014 | 1358 | 4 | 91.90% | 110 | 8.10% | 74.67% |
2020 | May | 1251 | 1358 | 1006 | 1358 | 5 | 92.12% | 107 | 7.88% | 74.08% |
2020 | June | 1240 | 1355 | 1002 | 1355 | 6 | 91.51% | 115 | 8.49% | 73.95% |
2020 | July | 1244 | 1359 | 998 | 1359 | 7 | 91.54% | 115 | 8.46% | 73.44% |
2020 | August | 1261 | 1369 | 1007 | 1369 | 8 | 92.11% | 108 | 7.89% | 73.56% |
2020 | September | 1270 | 1373 | 1026 | 1373 | 9 | 92.50% | 103 | 7.50% | 74.73% |
2020 | October | 1279 | 1381 | 1046 | 1381 | 10 | 92.61% | 102 | 7.39% | 75.74% |
2020 | November | 1282 | 1386 | 1052 | 1386 | 11 | 92.50% | 104 | 7.50% | 75.90% |
2020 | December | 1296 | 1401 | 1072 | 1401 | 12 | 92.51% | 105 | 7.49% | 76.52% |
2019 | January | 1129 | 1250 | 929 | 1250 | 1 | 90.32% | 121 | 9.68% | 74.32% |
2019 | February | 1139 | 1265 | 931 | 1265 | 2 | 90.04% | 126 | 9.96% | 73.60% |
2019 | March | 1149 | 1274 | 940 | 1274 | 3 | 90.19% | 125 | 9.81% | 73.78% |
2019 | April | 1161 | 1278 | 946 | 1278 | 4 | 90.85% | 117 | 9.15% | 74.02% |
2019 | May | 1166 | 1280 | 955 | 1280 | 5 | 91.09% | 114 | 8.91% | 74.61% |
2019 | June | 1181 | 1297 | 981 | 1297 | 6 | 91.06% | 116 | 8.94% | 75.64% |
2019 | July | 1194 | 1313 | 981 | 1313 | 7 | 90.94% | 119 | 9.06% | 74.71% |
2019 | August | 1192 | 1322 | 979 | 1322 | 8 | 90.17% | 130 | 9.83% | 74.05% |
2019 | September | 1208 | 1327 | 994 | 1327 | 9 | 91.03% | 119 | 8.97% | 74.91% |
2019 | October | 1218 | 1335 | 997 | 1335 | 10 | 91.24% | 117 | 8.76% | 74.68% |
2019 | November | 1222 | 1336 | 999 | 1336 | 11 | 91.47% | 114 | 8.53% | 74.78% |
2019 | December | 1228 | 1338 | 994 | 1338 | 12 | 91.78% | 110 | 8.22% | 74.29% |
2018 | January | 1043 | 1195 | 807 | 1195 | 1 | 87.28% | 152 | 12.72% | 67.53% |
2018 | February | 1054 | 1206 | 813 | 1206 | 2 | 87.40% | 152 | 12.60% | 67.41% |
2018 | March | 1055 | 1213 | 808 | 1213 | 3 | 86.97% | 158 | 13.03% | 66.61% |
2018 | April | 1050 | 1201 | 807 | 1201 | 4 | 87.43% | 151 | 12.57% | 67.19% |
2018 | May | 1063 | 1207 | 821 | 1207 | 5 | 88.07% | 144 | 11.93% | 68.02% |
2018 | June | 1067 | 1202 | 822 | 1202 | 6 | 88.77% | 135 | 11.23% | 68.39% |
2018 | July | 1065 | 1195 | 839 | 1195 | 7 | 89.12% | 130 | 10.88% | 70.21% |
2018 | August | 1083 | 1204 | 861 | 1204 | 8 | 89.95% | 121 | 10.05% | 71.51% |
2018 | September | 1104 | 1232 | 884 | 1232 | 9 | 89.61% | 128 | 10.39% | 71.75% |
2018 | October | 1124 | 1255 | 894 | 1255 | 10 | 89.56% | 131 | 10.44% | 71.24% |
2018 | November | 1139 | 1268 | 914 | 1268 | 11 | 89.83% | 129 | 10.17% | 72.08% |
2018 | December | 1126 | 1257 | 910 | 1257 | 12 | 89.58% | 131 | 10.42% | 72.39% |
Year | Month | Virally Suppressed Total | Virally Suppressed Count Total | Undetectable Total | Undetectable Count Total | Month Number | Viral Suppression % | Not Virally Suppressed Total | Not Virally Suppressed % | undetectable % |
2020 | January | 1213 | 1326 | 996 | 1326 | 1 | 91.48% | 113 | 8.52% | 75.11% |
2020 | February | 1237 | 1346 | 1011 | 1346 | 2 | 91.90% | 109 | 8.10% | 75.11% |
2020 | March | 1249 | 1352 | 1013 | 1352 | 3 | 92.38% | 103 | 7.62% | 74.93% |
2020 | April | 1248 | 1358 | 1014 | 1358 | 4 | 91.90% | 110 | 8.10% | 74.67% |
2020 | May | 1251 | 1358 | 1006 | 1358 | 5 | 92.12% | 107 | 7.88% | 74.08% |
2020 | June | 1240 | 1355 | 1002 | 1355 | 6 | 91.51% | 115 | 8.49% | 73.95% |
2020 | July | 1244 | 1359 | 998 | 1359 | 7 | 91.54% | 115 | 8.46% | 73.44% |
2020 | August | 1261 | 1369 | 1007 | 1369 | 8 | 92.11% | 108 | 7.89% | 73.56% |
2020 | September | 1270 | 1373 | 1026 | 1373 | 9 | 92.50% | 103 | 7.50% | 74.73% |
2020 | October | 1279 | 1381 | 1046 | 1381 | 10 | 92.61% | 102 | 7.39% | 75.74% |
2020 | November | 1282 | 1386 | 1052 | 1386 | 11 | 92.50% | 104 | 7.50% | 75.90% |
2020 | December | 1296 | 1401 | 1072 | 1401 | 12 | 92.51% | 105 | 7.49% | 76.52% |
2019 | January | 1129 | 1250 | 929 | 1250 | 1 | 90.32% | 121 | 9.68% | 74.32% |
2019 | February | 1139 | 1265 | 931 | 1265 | 2 | 90.04% | 126 | 9.96% | 73.60% |
2019 | March | 1149 | 1274 | 940 | 1274 | 3 | 90.19% | 125 | 9.81% | 73.78% |
2019 | April | 1161 | 1278 | 946 | 1278 | 4 | 90.85% | 117 | 9.15% | 74.02% |
2019 | May | 1166 | 1280 | 955 | 1280 | 5 | 91.09% | 114 | 8.91% | 74.61% |
2019 | June | 1181 | 1297 | 981 | 1297 | 6 | 91.06% | 116 | 8.94% | 75.64% |
2019 | July | 1194 | 1313 | 981 | 1313 | 7 | 90.94% | 119 | 9.06% | 74.71% |
2019 | August | 1192 | 1322 | 979 | 1322 | 8 | 90.17% | 130 | 9.83% | 74.05% |
2019 | September | 1208 | 1327 | 994 | 1327 | 9 | 91.03% | 119 | 8.97% | 74.91% |
2019 | October | 1218 | 1335 | 997 | 1335 | 10 | 91.24% | 117 | 8.76% | 74.68% |
2019 | November | 1222 | 1336 | 999 | 1336 | 11 | 91.47% | 114 | 8.53% | 74.78% |
2019 | December | 1228 | 1338 | 994 | 1338 | 12 | 91.78% | 110 | 8.22% | 74.29% |