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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

comparison of values column wise in matrix

Hi Team, @Ritaf1983 , @rajendraongole1 , 

 

 

help me out with this,

 

I have table like,

DimensionName RankDimension      Sum of asd    new value        flag first value
Faclitiy                   2024-03                 7819    
Faclitiy                   2024-04                  7864                 7819          greater
Faclitiy                     2024-05                7931                  7864          greater
Faclitiy                     2024-0612              7934               7909              lesser

 

where asd is row in data and i want to get value column where it will give data according to RankDimension rankdimension is just a type and i need one value column also in table 

 

please help me to solve this out.

 

it will be greatly appriciated thank you in advance

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Anonymous - Create a calculated column as below for new values

neww value =
VAR CurrentRank = 'Signalinfo'[RankDimension]
VAR PreviousRank = CALCULATE(
    MAX('Signalinfo'[RankDimension]),
    FILTER('Signalinfo', 'Signalinfo'[RankDimension] < CurrentRank && 'Signalinfo'[DimensionName] = EARLIER('Signalinfo'[DimensionName]))
)
RETURN
CALCULATE(
    MAX('Signalinfo'[Sum of asd]),
    FILTER('Signalinfo', 'Signalinfo'[RankDimension] = PreviousRank && 'Signalinfo'[DimensionName] = EARLIER('Signalinfo'[DimensionName]))
)

 

rajendraongole1_0-1721922639431.png

 

create another calculated column

flag1 =
IF(
    'Signalinfo'[Sum of asd] > 'Signalinfo'[neww value],
    "greater",
    "lesser"
)
 
rajendraongole1_1-1721922887593.png

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Anonymous - Create a calculated column as below for new values

neww value =
VAR CurrentRank = 'Signalinfo'[RankDimension]
VAR PreviousRank = CALCULATE(
    MAX('Signalinfo'[RankDimension]),
    FILTER('Signalinfo', 'Signalinfo'[RankDimension] < CurrentRank && 'Signalinfo'[DimensionName] = EARLIER('Signalinfo'[DimensionName]))
)
RETURN
CALCULATE(
    MAX('Signalinfo'[Sum of asd]),
    FILTER('Signalinfo', 'Signalinfo'[RankDimension] = PreviousRank && 'Signalinfo'[DimensionName] = EARLIER('Signalinfo'[DimensionName]))
)

 

rajendraongole1_0-1721922639431.png

 

create another calculated column

flag1 =
IF(
    'Signalinfo'[Sum of asd] > 'Signalinfo'[neww value],
    "greater",
    "lesser"
)
 
rajendraongole1_1-1721922887593.png

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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