Forum Discussion

IvanRivera4's avatar
IvanRivera4
Regular Visitor
9 years ago

Create table with dynamic pivot colum

Hi everyone,

 

I'm new on Power Bi and I need to create a table in which I could change the pivot colum to see the same KPI

 

Something like this:

 

NAME | MONEY | %   | 

JUAN  | 100        | 3% |

MIKE  | 50          | 2% |

MARIA | 40       | 10% |

 

Then with an arrow or something, chage it to gender

 

GENDER | MONEY | % |

MALE     |  150      |   5% | 

FEMALE |   40        | 10%|

 

 

and, for age

 

RANGE | MONEY |  %  |

10-20   | 140       | 13%|

20-30  | 50         | 2%   |

 

Thank you and regards.

 

 

 

 

GENDER

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi IvanRivera4,

     

    Current power bi not support to dynamic change group column, you should manually switch the group column to show different summary result.

     

    Calculate column 'Range':

     

    Range = INT([Age]/10)*10&"~"&(INT([Age]/10)+1)*10 

     

     

    Drag group, money, % columns to table, then switch summary mode of money and % column to sum. 

     

     

    Result:

     

    Regards,

    Xiaoxin Sheng

  • My thoughts.

     

    So your source table is going to have columns like:

     

    Name, Gender, Age Range, Money

     

    Just create you measures for Money and Percent. Manually replace Name, Gender, and Age Range for rows as needed (its just as easy as clicking a button).

     

    Filter context takes care of the rest.