Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
philsiqueira90
Frequent Visitor

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:

Screenshot_2.jpg

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

 

1 ACCEPTED SOLUTION
vapid128
Solution Specialist
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

View solution in original post

2 REPLIES 2
vapid128
Solution Specialist
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

Thank you so much. it works like a charm.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.