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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
99 | |
82 | |
67 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |