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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Getting comparison in Column

Hi All,

 

I have 7 calculated columns and need to compare the counts for various years.

I am trying to get the chage value as column but unable to get it .
If I create the Change  measure as Column it throws error for SAMEPERIODLASTYEAR which i have used.

Meausres:

FY-FY Change = IF([No of key Risks]-[Next\Pevious year]>0 ,"Low", "Up")

Where No of key risks is a measure.
Next\Pevious year= No of key risks for pervious or next year.
 
6.PNG
Need the above highlighted row as column value for each row.
 
Please suggest and feel free to reach out for any information.
1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Did these FY field measure or column? If column, you can add a measure with if condition to check current row contents to switch measure result of current formula.

Measure =
IF (
    ISFILTERED ( Table[FY] ),
    CALCULATE (
        SUM ( Table[Value] ),
        ALLSELECTED ( table ),
        VALUES ( Table[Cateogry] )
    ),
    IF ( [No of key Risks] - [Next\Pevious year] > 0, "Low", "Up" )
)

 

If they are measures, you can direct add three measures to value field and remove column fields.

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.