Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello everyone,
I have the following data:
id | name | city | age |
0 | philipe | serra | 32 |
1 | renilda | vila velha | 68 |
2 | luciana | serra | 38 |
3 | thiago | vila velha | 38 |
4 | joao | serra | 60 |
Using the same table, I did another visual:
city | between 30 and 40 |
serra | 2 |
vila velha | 1 |
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
Solved! Go to Solution.
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
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.
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |