Forum Discussion
Dynamic column names with a dimension table
Hello everyone,
I am a beginner and despite research, I haven't found any solution to my problem.
I work with a fact table and a dimension table. I want to put the fact table in matrix form and allow the columns displayed and their names to change according to a filtering by a slicer from the dimension table. I summarize the structure of these tables below :
Fact table :
| State | Col_A | Col_B |
| A | 1 | null |
| B | null | 1 |
| C | 1 | null |
Dimension table :
| State | Col_Name | Col_ID |
| A | Col_A | 01 |
| B | Col_A | 01 |
| C | Col_A | 02 |
So, I want to be able to display Col_A and renamed it "01" if state "A" is selected with the slicer and "02" if it is state "C" and not display it if it is state "B" (because no value).
Detail : I work in directquery mode due to the size of the data.
I hope that it is clear enough, thanks in advance.
3 Replies
- SpartaBI
Community Champion
Anonymous Field Parameters π
Check out these great resources:
https://www.youtube.com/watch?v=-nqEv2YXLsU&t=9s
https://www.youtube.com/watch?v=5vLBnrPyPgc&t=114s
https://www.youtube.com/watch?v=TufnsAxJsjs
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.Showcase Report β Contoso By SpartaBI
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
SpartaBI Logo- AnonymousNot applicable
SpartaBI Thank you for your answer, I went to find out about the field settings. I understood that we could dynamically change the columns of the matrix but is it possible to change their name according to another value that would filter the fact table (as mentioned above)? (If I choose "State : A", the column A displayed is renamed "01" but "02" if "C" is choosen)
Thanks a lot!
- SpartaBI
Community Champion
Not sure I understand, but, if I do, then yes, you could create field paramterd and give them differnet names and you could also do it for the same column.
Even if you can't do that in the UI you can do that easily in the resulted code of the calulculated table. Hope I got to your point you meant.
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.Showcase Report β Contoso By SpartaBI
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
SpartaBI Logo