Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
Im struggling abit with the following
I got a slicer that collects years from the calender
so atm its showing 2017 - 2018 - 2019 - 2020 -2021 -2022
i used CONCATENATEX to make a var with all the years in it
then i used CONTAINSSTRING to check whatever is clicked and add data to that
the thing is now that i need some kinda loop and i dont know how to build it
there is a formula after that , thatgives weight to the years, depending on what is clicked in the slicer
so for example if clicked 2022 2021 2020 2018 --> 2022 = 50% , 2021 = 35% , 2020 = 10% , 2018 = 10%
but it should also do it when you skip a year or more years
so for example if clicked 2022 2020 2017 --> 2022 = 50% , 2020 = 35 % , 2017 = 15%
so basicly last year in selection allways have the biggest weight 50%
next one in row from the selected gets 35%
next one in row from the selected gets 15%
and so on
anyone abble to help me out here, my brain been explodnig to trying to figure this out and its probably so easy
thx Mike
Solved! Go to Solution.
Figured it out, got it working now
used RANKX to give them a prio, works like a charm 🙂
got rid of the CONCATENATEX and ONTAINSSTRING aswell, much better now, ty 🙂
Figured it out, got it working now
used RANKX to give them a prio, works like a charm 🙂
got rid of the CONCATENATEX and ONTAINSSTRING aswell, much better now, ty 🙂
Thx for the reply 🙂
It can be anything, from minumum 1 year to maximum 5 years selected
i use a switch() to divide the % depending on the count of the selection
Hi @Mike_1
many ways to do that but you need to be more specific about the weights. The latest selected year is 50% then 35% then 15% then 10% then? And how many years can be selected at once.
The first thing to do is not to use CONCATENATEX -with CONTAINSSTRING but to use VALUES or ALLSELECTED with CONTAINS instead.
User | Count |
---|---|
60 | |
22 | |
18 | |
18 | |
16 |
User | Count |
---|---|
87 | |
59 | |
52 | |
38 | |
21 |