Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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 :

StateCol_ACol_B
A1null
Bnull1
C1null


Dimension table :

StateCol_NameCol_ID
ACol_A01
BCol_A01
CCol_A02

 

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