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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

two rows per record dependent on date for value

I want to compare the tiers of 2019 vs 2020, by creating a column for each. Some companies may not have a 2019 or 2020 but all have at least one or both, meaning two records. 

 

If a company has 2019 and 2020, it brings the record in twice. and displays the Tier on its own line -- I just need one row per company name. This is my result:

Capture1.JPG

Desired result (THIS IS USING A MATRIX -- BUT DOESNT COVER WHAT I NEED, NEED COLUMN FOR EACH YEAR:Capture.JPG

1 ACCEPTED SOLUTION

Do this on Power Query:

- select your column "Year"

- at "Transform" tab, hit "Pivot Column"

- select your column "Tier"

- on "Advanced options", choose "Don't aggregate"

 

View solution in original post

4 REPLIES 4
bluedatenbrian
Advocate II
Advocate II

Hi Cezar, You can do this:
- replace (blank) values with (null) at column 2020

- order your set by 2019

- fill 2020 down (or up)

- filter yout set by 2019, removing (blank) values

Try this and I think you'll find your solution. 

Greg_Deckler
Community Champion
Community Champion

I think you need to unpivot your columns? Hard to tell, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 
@bluedatenbrian -- TIER 2019 AND TIER 2020 are the columns im loooking to create

Left is my dataset--Right is desired. Will creating columns with DAX be enough to create those?

Capture.JPG

Do this on Power Query:

- select your column "Year"

- at "Transform" tab, hit "Pivot Column"

- select your column "Tier"

- on "Advanced options", choose "Don't aggregate"

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors