Forum Discussion
Dynamic parameter that populates a column, and changes it's value based on customers/clients
Hi all,
I was wanting to know if anyone knew a way to create a parameter that can have different values in the same column, based on the customers in a table.
For example, I would like some clients in the table to have a value of 5, some a value of 4 etc. These values would then be used in the calculations for other measures.
The values for each client would be determined by the user selecting which value each client can have
Thank you!
Hi Anonymous ,
According to your needs, if you want to continue to classify customers based on numbers and continue the subsequent operations, you can use the Rank function to sort them in descending order. The largest number indicates the greater the importance of the customer. For further processing, you can use the if function.
like this:
M = if(number meet the condition,A,B)If you still can’t solve it, can you provide the expected results and test data, so I will answer you as soon as possible. Let me know immediately and looking forward to your reply.
Best Regards,
HenryIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- parry2kSuper User
Anonymous you can use random function to generate number for new column:
RANDBETWEEN function (DAX) - DAX | Microsoft Docs
RAND function (DAX) - DAX | Microsoft Docs
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable
Thanks for the quick reply.
Sorry I should have been more specific. Basically I want the user to be able to categorise certain clients with a number (the higher the number the more important they are), with this number then feeding into other calculations (that rate the customers overall value).
- v-henryk-mstfCommunity Support
Hi Anonymous ,
According to your needs, if you want to continue to classify customers based on numbers and continue the subsequent operations, you can use the Rank function to sort them in descending order. The largest number indicates the greater the importance of the customer. For further processing, you can use the if function.
like this:
M = if(number meet the condition,A,B)If you still can’t solve it, can you provide the expected results and test data, so I will answer you as soon as possible. Let me know immediately and looking forward to your reply.
Best Regards,
HenryIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- parry2kSuper User
Anonymous then you should look into rank. Read posts here on ranking
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡