Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
KayCon
Frequent Visitor

Switch Command on ages help needed

Morning 

 

I am trying to work out specific need depending on ages of children in each household. (bedroom requirements) Each person is on a seperate row with Family Ref linking them together, I need to work out the number of additional bedrooms depending on the following....

 

Opposite sex can share up until age of 10
Same sex can share up until age of 16
Anyone over 16 is entitled to their own bedroom.

 

I have the following columns to use 

  • Family Ref No.
  • Name
  • Type (Mother,Father,Son,Daughter)
  • DOB
  • Age (calulated from DOB)
  • Max Age of Family
  • Min Age of Family 
  • Type2 (Adult/Child)
  • No of People in Family

Idealing I am looking for an output to show who needs 2 beds, 3 beds ect... I've used Switch before but not is this complexity.

 

Any advice would be apprieated.

1 REPLY 1
FreemanZ
Super User
Super User

hi @KayCon ,

 

try to post some sample data, ideally with expected result.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.