Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
We got requirement to show the users count with age distributions. For example we have to show the users count by age between breakups . X axis values should be : 18-35 , 36-50,51-64, 65>above. Y axis : users count. Please suggest us how to calculate users count based on age breakups ?
Solved! Go to Solution.
Here is one way for your reference.
1) add a caculated column AgeGroup
AgeGroup = IF ( Persons[Age] < 18, "1) <18", IF ( Persons[Age] <= 25, "2) 18-25", IF ( Persons[Age] <= 50, "3) 26-50", "4) >50" ) ) )
2) add a measure UsersCount
UsersCount = COUNTX ( Persons, 1 )
Here is one way for your reference.
1) add a caculated column AgeGroup
AgeGroup = IF ( Persons[Age] < 18, "1) <18", IF ( Persons[Age] <= 25, "2) 18-25", IF ( Persons[Age] <= 50, "3) 26-50", "4) >50" ) ) )
2) add a measure UsersCount
UsersCount = COUNTX ( Persons, 1 )
Thanks Sam,
I have found one more solutoin, We can able add conditions by using Conditional Column feature in query editor.
User | Count |
---|---|
15 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
17 | |
11 | |
5 | |
4 | |
3 |