Forum Discussion

dataaanana's avatar
dataaanana
Frequent Visitor
2 years ago

Need help in creating a histogram from a measure

Hello! I have an [Age] measure that calculates the age of active employees given a chosen year. I'm attempting to create a histogram to show the distribution of the ages of active employees given a chosen year using this measure. Is this possible? I attached my .pbix file here. I tried creating the histogram using a calculated column but since it's a calculated column, ages will not be updated if I select other years.

I tried categorizing the ages of all active employees given a selected year using the formula below but I'm not really sure how I can used this in creating my histogram. Please help! Thank you so much.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dataaanana ,

    May I ask if the age distribution intervals in your histogram are fixed?

    If it is fixed, you can create a measure each for Under25, 25-34, 35-44, 45-54, and 55+ and then put those 5 measures into the histogram. This is because the calculated columns do not change in real time depending on the year you choose, but the measures do.

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.