Forum Discussion

philsiqueira90's avatar
philsiqueira90
Frequent Visitor
4 years ago
Solved

Filter another visual using power query custom column

Hello everyone,

I have the following data: 

 

idnamecityage
0philipeserra32
1renildavila velha68
2lucianaserra38
3thiagovila velha38
4joaoserra60



Using the same table, I did another visual:

citybetween 30 and 40
serra2
vila velha1

 

This second column is a conditional column that I did using power query.

My goal is: When I select a row of the column "between 30 and 40" I want to return just the rows of these selected ages on the first visual, but when I do this select, the table is returning people with another age, per example: joao isn't supposed to be here:

It seems power bi doesn't recognized my custom column as a valid value or something, I really don't know what I'm doing wrong.

Any help is welcome! Thanks

 

  • if you only want to see people between 30 and 40 on this page

    Use the page filter.

     

    If you want to see 20-30 30-40 40-50.... by a filter.

    so you need a filter like

    20-30

    30-40

    40-50

    50-60

    60-70

     

    that means in the table, you need to group those people.

    add colnum

     

    Age Group = 

    switch(true(),

    table[age]<10,"0-10',

    table[age]<20,"10-20',

    table[age]<30,"20-30',

    table[age]<40,"30-40',

    table[age]<50,"40-50',

    table[age]<60,"50-60',

    "60+"

    )

     

    Use matrix table

    CITY/AGE Group

2 Replies

  • vapid128's avatar
    vapid128
    Solution Specialist

    if you only want to see people between 30 and 40 on this page

    Use the page filter.

     

    If you want to see 20-30 30-40 40-50.... by a filter.

    so you need a filter like

    20-30

    30-40

    40-50

    50-60

    60-70

     

    that means in the table, you need to group those people.

    add colnum

     

    Age Group = 

    switch(true(),

    table[age]<10,"0-10',

    table[age]<20,"10-20',

    table[age]<30,"20-30',

    table[age]<40,"30-40',

    table[age]<50,"40-50',

    table[age]<60,"50-60',

    "60+"

    )

     

    Use matrix table

    CITY/AGE Group