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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
avarghese
Regular Visitor

Transpose rows to column based on condition

Hi,

 

I am trying to find a way transpose the row short_name which contains the values MAIM and  AIM into two columns. Is this possbile to be done in Power BI ? 

 

SchoolIdValueAspectIdaspectaspect_descshort_name
070557001540No43Communication and LanguageEYFS TrackerCL
070557001540Yes62Expressive Art and DesignEYFS TrackerEAD
070557001540Yes45LiteracyEYFS TrackerL
070557001540Yes46MathsEYFS TrackerM
0705570015405441Milestone Age in MonthsEYFS TrackerMAIM
070814115383Yes44Physical DevelopmentEYFS TrackerPD
070814115383Yes42Personal, Social and Emotional DevelopmentEYFS TrackerPSED
070814115383No61Understanding the WorldEYFS Tracker

 

 

 

 

 

After transpose it should look like the below

 

SchoolIdValueAspectIdaspectshort_nameMilestone Age
070557001540No43Communication and LanguageCLMAIM
070557001540Yes62Expressive Art and DesignEADMAIM
070557001540Yes45LiteracyLMAIM
070557001540Yes46MathsMMAIM
070557001540Yes44Physical DevelopmentPDMAIM
070557001540Yes42Personal, Social and Emotional DevelopmentPSEDMAIM
070557001540Yes61Understanding the WorldUTWMAIM
070814115383No43Communication and LanguageCLMAIM
070814115383Yes62Expressive Art and DesignEADMAIM
070814115383No45LiteracyLMAIM
070814115383Yes46MathsMMAIM
070814115383Yes44Physical DevelopmentPDMAIM
070814115383Yes42Personal, Social and Emotional DevelopmentPSEDMAIM
070814115383No61Understanding the WorldUTWMAIM

 

Thanks

 

Best regards,

abraham

3 REPLIES 3
avarghese
Regular Visitor

Hello Amit,

 

Sorry for the late response. I got busy with some blackout issues. My original data is as below and I need to produce a report as shown the below format. 

 

Orignal Data

 

SchoolIdValueAspectIdaspectaspect_descshort_namegroup_namegradesetid
0705570015405441Milestone Age in MonthsEYFS TrackerMAIMBaseline5
070557001540No43Communication and LanguageEYFS TrackerCLBaseline4
070557001540Yes42Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
070557001540Yes44Physical DevelopmentEYFS TrackerPDBaseline4
070557001540Yes45LiteracyEYFS TrackerLBaseline4
070557001540Yes46MathsEYFS TrackerMBaseline4
070557001540Yes61Understanding the WorldEYFS TrackerUTWBaseline4
070557001540Yes62Expressive Art and DesignEYFS TrackerEADBaseline4
0708141153835441Milestone Age in MonthsEYFS TrackerMAIMBaseline5
070814115383No43Communication and LanguageEYFS TrackerCLBaseline4
070814115383No45LiteracyEYFS TrackerLBaseline4
070814115383No61Understanding the WorldEYFS TrackerUTWBaseline4
070814115383Yes42Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
070814115383Yes44Physical DevelopmentEYFS TrackerPDBaseline4
070814115383Yes46MathsEYFS TrackerMBaseline4
070814115383Yes62Expressive Art and DesignEYFS TrackerEADBaseline4
0811035086163622Milestone Age in MonthsEYFS TrackerMAIMBaseline5
081103508616No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
081103508616No24LiteracyEYFS TrackerLBaseline4
081103508616Yes16Communication and LanguageEYFS TrackerCLBaseline4
081103508616Yes23Physical DevelopmentEYFS TrackerPDBaseline4
081103508616Yes25MathsEYFS TrackerMBaseline4
0833311194534222Milestone Age in MonthsEYFS TrackerMAIMBaseline5
083331119453No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
083331119453No16Communication and LanguageEYFS TrackerCLBaseline4
083331119453No24LiteracyEYFS TrackerLBaseline4
083331119453No25MathsEYFS TrackerMBaseline4
083331119453Yes23Physical DevelopmentEYFS TrackerPDBaseline4
0833476418774222Milestone Age in MonthsEYFS TrackerMAIMBaseline5
083347641877No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
083347641877No23Physical DevelopmentEYFS TrackerPDBaseline4
083347641877No24LiteracyEYFS TrackerLBaseline4
083347641877Yes16Communication and LanguageEYFS TrackerCLBaseline4
083347641877Yes25MathsEYFS TrackerMBaseline4

 

final output

 
% YesAll YesAll No
MAIMPSEDCLPDLM% All Yes% All No
36       
42       
54       
All       

 

Hope this clarifies the query. Is this possible to be achieved in Power BI ?

 

Thanks.

 

Best regards,

Abraham

amitchandak
Super User
Super User

@avarghese , what logic of table 2, I am not able to get.

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Hello Amit,

 

Sorry for the late response. I got busy with some blackout issues. My original data is as below and I need to produce a report as shown the below format. 

 

Orignal Data

 

SchoolIdValueAspectIdaspectaspect_descshort_namegroup_namegradesetid
0705570015405441Milestone Age in MonthsEYFS TrackerMAIMBaseline5
070557001540No43Communication and LanguageEYFS TrackerCLBaseline4
070557001540Yes42Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
070557001540Yes44Physical DevelopmentEYFS TrackerPDBaseline4
070557001540Yes45LiteracyEYFS TrackerLBaseline4
070557001540Yes46MathsEYFS TrackerMBaseline4
070557001540Yes61Understanding the WorldEYFS TrackerUTWBaseline4
070557001540Yes62Expressive Art and DesignEYFS TrackerEADBaseline4
0708141153835441Milestone Age in MonthsEYFS TrackerMAIMBaseline5
070814115383No43Communication and LanguageEYFS TrackerCLBaseline4
070814115383No45LiteracyEYFS TrackerLBaseline4
070814115383No61Understanding the WorldEYFS TrackerUTWBaseline4
070814115383Yes42Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
070814115383Yes44Physical DevelopmentEYFS TrackerPDBaseline4
070814115383Yes46MathsEYFS TrackerMBaseline4
070814115383Yes62Expressive Art and DesignEYFS TrackerEADBaseline4
0811035086163622Milestone Age in MonthsEYFS TrackerMAIMBaseline5
081103508616No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
081103508616No24LiteracyEYFS TrackerLBaseline4
081103508616Yes16Communication and LanguageEYFS TrackerCLBaseline4
081103508616Yes23Physical DevelopmentEYFS TrackerPDBaseline4
081103508616Yes25MathsEYFS TrackerMBaseline4
0833311194534222Milestone Age in MonthsEYFS TrackerMAIMBaseline5
083331119453No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
083331119453No16Communication and LanguageEYFS TrackerCLBaseline4
083331119453No24LiteracyEYFS TrackerLBaseline4
083331119453No25MathsEYFS TrackerMBaseline4
083331119453Yes23Physical DevelopmentEYFS TrackerPDBaseline4
0833476418774222Milestone Age in MonthsEYFS TrackerMAIMBaseline5
083347641877No14Personal, Social and Emotional DevelopmentEYFS TrackerPSEDBaseline4
083347641877No23Physical DevelopmentEYFS TrackerPDBaseline4
083347641877No24LiteracyEYFS TrackerLBaseline4
083347641877Yes16Communication and LanguageEYFS TrackerCLBaseline4
083347641877Yes25MathsEYFS TrackerMBaseline4

 

final output

 
% YesAll YesAll No
MAIMPSEDCLPDLM% All Yes% All No
36       
42       
54       
All       

 

Hope this clarifies the query. Is this possible to be achieved in Power BI ?

 

Thanks.

 

Best regards,

Abraham

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.