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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ShyamS
Frequent Visitor

Subtract one column value to each column values in same row

1000039893.jpg

 Hi All,

As per my business requirements I have to subtract current year (actual) column values to all the other column(MAR_FCST,PLAN, ACTUAL (2023)) values as shown in the matrix visuals. I am able to that for current year means current year actual column value I am able to subtract from current year mar_fcst, and plan and Actual. But not able to subtract current year actual column value to previous year actual column value.

I am getting correct results in the GTN% GS~ 

For year 2024 columns.

Explanation is below:

I want to subtract 2024 ACTUAL column value which is 43.8% to other column that is 

(43.8-43.8) for plan and (42.8-43.8) for mar-fcst and (42.7-43.8) for plan and (40.9-43.8) for 2023 actual. But I am not able to do that for 2023. 

I am using below dax:

1000039894.jpg

 please help to guide me how to achieve this.

 

Thanks in advance for the time and guidance 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ShyamS 

 

Given that I don't understand the structure of your specific data, I can only give you some suggestions that might be useful:

Maybe you can change your measure into this:

GTN % GS ~ =
VAR A = [GTN % GS]
VAR CurrentDate =
    MAX ( CV_GMR_PL_APAC_REPORT[Year] )
VAR B =
    CALCULATE (
        [GTN % GS],
        CV_GMR_PL_APAC_REPORTING[Year] = YEAR ( CurrenDate ),
        CV_GMR_PL_APAC_REPORTING[Scenario] = "ACTUAL"
    )
VAR C = ( ( A - B ) * 10000 )
RETURN
    C

Hope it helps,

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


 

View solution in original post

2 REPLIES 2
ShyamS
Frequent Visitor

Hi @Anonymous , 

Need your guidance on above query.

Thank you in advance for your help and guidance.

Anonymous
Not applicable

Hi @ShyamS 

 

Given that I don't understand the structure of your specific data, I can only give you some suggestions that might be useful:

Maybe you can change your measure into this:

GTN % GS ~ =
VAR A = [GTN % GS]
VAR CurrentDate =
    MAX ( CV_GMR_PL_APAC_REPORT[Year] )
VAR B =
    CALCULATE (
        [GTN % GS],
        CV_GMR_PL_APAC_REPORTING[Year] = YEAR ( CurrenDate ),
        CV_GMR_PL_APAC_REPORTING[Scenario] = "ACTUAL"
    )
VAR C = ( ( A - B ) * 10000 )
RETURN
    C

Hope it helps,

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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