Forum Discussion
Getting Model Parameter to work with Switch in Calculated Column (classic ABC case)
LasseMr , everything is correct. The column with my name needs to be a measure 😆.
Just create that as a measure, the one you have shown in the screenshot. File attached after signature
amitchandak , you have sent me in the right direction to search for the answer, and it seems to be a dead end, that Power BI does not allow slicer values as part of a calculated column formula. I.e. not posible to make calculated columns "dynamic".
I found the following link: https://community.powerbi.com/t5/Desktop/Slicer-Value-in-Column-Formula/td-p/214892
It annoys me quite a bit because it would be a tremendous great feat for the users to be able to simulate the parameters themselves and provide them with the result of items per category.
Do you know of a workaround?
Thank you for your help in any case!
- LasseMr4 years agoAdvocate II
Closest I have found becomes a bit more advanced: https://www.goodly.co.in/measures-in-columns-matrix-powerbi/
Gotta be a smarter way around, anyways, I'll give that a try later.
- Anonymous4 years agoNot applicable
- LasseMr4 years agoAdvocate II
Hi Anonymous ,
No, unfortunately no.
I have learned that Power BI does not support dynamic calculated columns, which I kind of understand the technical reason "why" - i.e. being in control of memory and CPU after a dataset is published and only updated at "refresh".
I am still thinking that there could be a work around, but it gets much more complicated than what I have had time and competences for, i.e. I am thinking following could draw inspiration for something that "could work": https://www.goodly.co.in/measures-in-columns-matrix-powerbi/
Basically, what I would like to be able to do is making a matrix with ABC (and later XYZ) on rows with count of unique items in values and being able to click e.g. the amount of A items and having the table below with the details filter all A items. Right now it works if I fix the measure-levels between A,B,C items in a calculated column, but it does not work if I make the measure-levels between A,B,C parameter controlled with a slicer, i.e. making the input to the calculated column dynamic, so the user can simulate on their own the impact of different levels.
See attached test-PBIX from earlier post.
Do you see other options Anonymous ?