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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Godislove22222
Frequent Visitor

Consolidate rows and sum

Good day PowerBI Guru. 

Newbe here.  

My data has the following layout. 
Goal:  Remove "Line" by summing FY23, then FY 24 for each office.

Then caluate % Difference and have an icon or chart showing increase or decrease.

 

Data looks like this...

 

OfficeLineFY2023 PlanFY 2024 Plan% Difference% Difference Icon 
Office ALine 1100200  
Office ALine 2110105  
Office BLine 3120220  
Office CLine 2130230  
Need this...    
 FY2023 PlanFY 2024 Plan% DifferenceIcon 
Office A210305  
Office B120220  
Office C130230  
1 ACCEPTED SOLUTION

Hi @Godislove22222 

Based on the data you have provided, the value of sox com in 2023 is 0.

vxinruzhumsft_0-1708304322865.png

so it will returen 0

 

Best Regards!

Yolo Zhu

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

8 REPLIES 8
Godislove22222
Frequent Visitor

CATEGORYLINE2023 PLAN2024 Plan
MONEY3V134964112500
ETRAVEL3V10108975817
ORACLE3V1798866884543
PRINTING3430600002718046
PRINTING3606500000
PRINTING310500000
FUEL3T-24463600-15529604
SMART P3T-723025-991778
REVENUE3602344350
REVENUE3V207006100000
SOX COM3609430460
ACCOUNT460300000
ACCOUNT3V10374791106125
OTHER R3V21712302099101
PAYROLL3V13570191145400
FUND3V4523441500
TRAVEL3V11984296880
TRAVEL341586016000
RPA468941791300
EMIN362850008047817
AUDIT T6W02500
AUDIT T3V58805104580
CLAIMS34701950000
CLAIMS3V759026993144
TIMEATD3V12665511162000
Godislove22222
Frequent Visitor

2024-02-14_9-47-01.png

Hi @Godislove22222 

Do you mean that you want to add a new column in the table to calculate the difference?

If you want to achieve it, you can refer to the following calculated columns.

Sum_2023 = SUMX(FILTER('Table',[CATEGORY]=EARLIER('Table'[CATEGORY])),[2023 PLAN])
Sum_2024 = SUMX(FILTER('Table',[CATEGORY]=EARLIER('Table'[CATEGORY])),[2024 Plan])
%Difference = DIVIDE([Sum_2024]-[Sum_2023],[Sum_2023])

Output

vxinruzhumsft_0-1707960779036.png

If you want to implement it by using measure,  you just put the CATEGORY to the row field to the matrix, and put the 2023 plan and 2024 plan to the value, it will automatic aggregate. then follow the soution I offered at 4th message to create the measure.

vxinruzhumsft_1-1707961108155.png

Best Regards!

Yolo Zhu

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

 

 

 

When I add the % Difference column to what you provided, I get the following.  Is this correct?  And lastly, the "SOX COM" had a zero plan in FY23 but a positive amount in FY24. Any suggestions for this one? 

Godislove22222_0-1708096835984.png

 

 

Hi @Godislove22222 

Based on the data you have provided, the value of sox com in 2023 is 0.

vxinruzhumsft_0-1708304322865.png

so it will returen 0

 

Best Regards!

Yolo Zhu

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

 

 

v-xinruzhu-msft
Community Support
Community Support

Hi @Godislove22222 

1.You can create a measure.

Difference = DIVIDE(SUM('Table'[FY 2024 Plan])-SUM('Table'[FY2023 Plan]),SUM('Table'[FY2023 Plan]))

2.Create a measure to set the icon.

Format = if([Difference]>0,1,0)

3.Put the following field to a matrix visual.

vxinruzhumsft_1-1707885381528.png

 

4.Set the conditional formatting of the difference measure, select 'Icon'

vxinruzhumsft_0-1707885331623.png

5.Set the rule.

vxinruzhumsft_2-1707885409560.png

 

Output

vxinruzhumsft_3-1707885418410.png

Best Regards!

Yolo Zhu

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

 

Godislove22222
Frequent Visitor

Godislove22222_0-1707844874504.png

 

Thank you!!!

My issues is I have some values with zeros that is resulting in an error. 

 

Please see attached is the file.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.