• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Calculated fields|Power Pivot|Excel Forum|My Online Training Hub

You are here: Home / Calculated fields|Power Pivot|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower PivotCalculated fields
sp_PrintTopic sp_TopicIcon
Calculated fields
Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
1
January 3, 2021 - 1:27 pm
sp_Permalink sp_Print

Hi Mynda

 

I have 3 tables - 1. Trial balance with ledger accounts 2. Master table with ledgers and groupings 3. Budget for group of accounts

I created a profit & loss a/c in pivot table using data model adding the above 3 tables containing actual and budgeted figures.

                                    Actual            Budget for remaining months                  Total for the year

1. Sales                         XXX                            XXX                                              XXX

2. Purchases                  XXX                            XXX                                              XXX

3. Direct exp                 XXX                             XXX                                              XXX

4. Fixed exp                  XXX                             XXX                                              XXX

 

From above rows, I would like to calculate Gross profit (Sales minus purchases minus direct exp) and Net profit (Gross profit minus fixed exp)

In normal pivot table, I am able to get it by using calculated fileds.  But in pivot table with data model I am unable to find the calculated fileds.  Pls help.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1845
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
January 3, 2021 - 2:55 pm
sp_Permalink sp_Print

Hi Thulasi,

For Gross Profit, should be something like this:

Sales=CALCULATE(SUM(ValuesTable[Actual], ValuesTable[Category]="Sales")
DirExp=CALCULATE(SUM(ValuesTable[Actual]), ValuesTable[Category]="Direct exp")

FixedExp=CALCULATE(SUM(ValuesTable[Actual]), ValuesTable[Category]="Fixed exp")

GP=[Sales]-[DirExp]

NET=[Sales]-[DirExp]-[FixedExp]

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
3
January 4, 2021 - 11:05 pm
sp_Permalink sp_Print

Hi Catalin Bombea

Thanks for your reply and suggestion.  But I am sorry to say that I am unable to follow it.

Sales, Direct exp, fixed exp are rows in the pivot table.  I would like to insert the image of the PT.  How to insert it here, pls guide.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1845
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
4
January 4, 2021 - 11:24 pm
sp_Permalink sp_Print

Hi Thulasi,

Below message editor, there is an Attachments button.

Instead of an image, please upload a sample file with your data structure, it will be easier to work on a real example.

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
5
January 5, 2021 - 12:15 am
sp_Permalink sp_Print

Hi Catalin Bombea

Thanks.  I will attach the file for more clarification of my query.  Thanks a lot.

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
6
January 5, 2021 - 12:36 am
sp_Permalink sp_Print

Hi Catalin Bombea

I have uploaded file for your reference.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1845
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
7
January 6, 2021 - 1:42 pm
sp_Permalink sp_Print

Hi Thulasi,

A calculated field in a normal pivot does not add the results below row fields a new rows, it is added as a calculated column.

You can try cube formulas in normal cells, above your pivot:
=GETPIVOTDATA("[Measures].[TOTAL]",$A$1,"[Masters].[PrimaryGroup]","[Masters].[PrimaryGroup].&[Sales Accounts]")

=GETPIVOTDATA("[Measures].[TOTAL]",$A$1,"[Masters].[PrimaryGroup]","[Masters].[PrimaryGroup].&[Duty Drawback]")

combine such formulas to make your totals calculation

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
8
January 16, 2021 - 3:26 pm
sp_Permalink sp_Print

Thanks.  Let me try.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Mike Magill
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 185
Newest Members:
Kwaje Alfred Mogga
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Rob Rooth
Forum Stats:
Groups: 3
Forums: 24
Topics: 6542
Posts: 28648

 

Member Stats:
Guest Posters: 49
Members: 32831
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.