Forum Discussion

JanBuzek's avatar
JanBuzek
Frequent Visitor
7 years ago
Solved

Employee age structure

 Hello,   I am trying to create a model that would predict future age structure of employees. To do this I wanted to have a line chart with Count of employees on Y-axis and different ages on X-axis...
  • v-jiascu-msft's avatar
    7 years ago

    Hi Jan,

     

    Please download the solution from the attachment. 

    1. Create an independent table [Ages] in case that no all the ages are listed. Don't establish a relationship.

    Ages = GENERATESERIES(20, 65, 1)

    2. Create a what-if parameter from 0 to the number you need, which means the years. For example, 1 year later.

    Measure =
    SUMX ( 'Table1', IF ( [Age] = MIN ( Ages[Value] ) - [Parameter Value], 1, 0 ) )
    

    3. Create a visual. 

    Employee-age-structure

     

    Best Regards,
    Dale