Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

How to create custom matrix structure with dynamic headers from measures

Hi,

 

I am looking for custom matix structure with dynamic headers coming from created measures.

my existing structure look like below.

 

Prodcut service  total %total open Open% Close close%
Phase 5               2     13%      5         100%    0        0%
Phase 4               0      0%       5         100%   0        0%
Phase 3               5      33%     0           0%     3        100%
Phase 2               3      20%    1           50%    1        50%
Phase 1               5      33%     0           0%     0         0%
Total                  15     100%   1           13%    4         26%

 

In the above all column headers are done from measures and iwould like to create new header for goruping 2 columns as one set for example

for measures total and %total  i need to create new header "TOTAL" with merge and style .

for measures Open and %open i need to create new header "Open" with merge and style .

for measures close and %close i need to create new header "Close" with merge and style .

my overall expected output like below

 

 Total Open close 
Service TypesTotal% totalOpen%OpenClose%Close
Phase 1533.33%5100.00%00.00%
Phase 2533.33%5100.00%00.00%
Phase 3020.00%00.00%3100.00%
Phase 4113.33%150.00%150.00%
Phase 500.00%00.00%00.00%
Total15100.00%1173.33%426.67%

 

Please check sample pbix file here :

https://onedrive.live.com/?cid=9E9277B1AE261150&id=9E9277B1AE261150%21118&parId=root&o=OneUp

 

I have tried with diffrent options by dax with select columns but i didnt get expected result as same structure as above . so please share your inputs and posssible solution.

 

Thanks in advane for your help.

 

Thanks,

mahi1827

 

3 Replies