Forum Discussion
Customised Bins for Age Field
Hi All,
I would need a help to know how i can make bins as per my choice in power bi.
So I have [Age] field, and it has values from diff age groups varies from 15 yrs to 70 yrs.
I want to see which age group is using my product more or have most no of footfall in my app.
this code is not working for me
Below is a demo of that...
Hi Sushant_Uniphor ,
Are you trying to create a column to use on the X axis? based on the age in the Tableau_vw_TotalUsers table?
If so you can create a calc column like the following:
User Bin = switch(true(), 'Tableau_vw_TotalUsers'[Age] <=10, "less than 10", 'Tableau_vw_TotalUsers'[Age] <=20, "between 10 and 20", ...., "greater_than_n" )Hope that Helps
- Anonymous5 years ago
You can achieve it by creating a conditional column for the ranges and then using that field on the chart.
Go to Power Query > Add Column > Conditional Column and type the following conditions:
I used a random sample from Excel. Find my work files on the following Drive folder.
3 Replies
- richbenmintz
Resident Rockstar
Hi Sushant_Uniphor ,
Are you trying to create a column to use on the X axis? based on the age in the Tableau_vw_TotalUsers table?
If so you can create a calc column like the following:
User Bin = switch(true(), 'Tableau_vw_TotalUsers'[Age] <=10, "less than 10", 'Tableau_vw_TotalUsers'[Age] <=20, "between 10 and 20", ...., "greater_than_n" )Hope that Helps
- AnonymousNot applicable
You can achieve it by creating a conditional column for the ranges and then using that field on the chart.
Go to Power Query > Add Column > Conditional Column and type the following conditions:
I used a random sample from Excel. Find my work files on the following Drive folder.
- AnonymousNot applicable
Hi Sushant_Uniphor,
Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.
If these also not help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng