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
jkbyerly
New Member

Trouble comparing values in the same column

My data source has the first three columns shown below.  I can't figure out how to create the two columns on the right.  Essentially what I'm trying to do is create a price ratio for each month.  'Standard' is the baseline that other prices should be compared to.  Any ideas?

 

MonthGroupPriceStandard for the month% to Standard
JanBasic11.2580%
JanStandard1.251.25100%
JanPremium1.51.25120%
JanSpecialty1.751.25140%
FebBasic0.951.2874%
FebStandard1.281.28100%
FebPremium1.541.28120%
FebSpecialty1.81.28141%
MarBasic1.021.378%
MarStandard1.31.3100%
MarPremium1.581.3122%
MarSpecialty1.821.3140%
1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@jkbyerly

 

Hi, create the calculated columns:

 

1:  Standard Column

 

Standard =
CALCULATE (
    VALUES ( Table1[Price] ),
    FILTER ( ALLEXCEPT ( Table1, Table1[Month] ), Table1[Group] = "Standard" )
)

2. % to Standard Column

 

% To Standard = Divide(Table1[Price],Table1[Standard])

Ready.




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@jkbyerly

 

Hi, create the calculated columns:

 

1:  Standard Column

 

Standard =
CALCULATE (
    VALUES ( Table1[Price] ),
    FILTER ( ALLEXCEPT ( Table1, Table1[Month] ), Table1[Group] = "Standard" )
)

2. % to Standard Column

 

% To Standard = Divide(Table1[Price],Table1[Standard])

Ready.




Lima - Peru

You are a genius!!  Thanks so much for the quick and helpful reply.

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.