Forum Discussion
difference between columns in pivot table
Hi Ffitzpatrick47,
Ensure the following:
- There is a calendar table
- There is a relationship from the Date column of your Data Table to the Date column of your Data Table
- Extract Year using =YEAR(Calendar[Date]) in the Calendar table
- Drag Year from the calendar table in yoru visual
Use the following calculated field formulas to get yearwise/fruit wise values
Amount=SUM(Data[Amt])
Diff=[Amount]-CALCULATE([Amount],PREVIOUSYEAR(Calendar[Date])
Hope this helps.
I just did the years as an example. In reality, none of the date logic helps me because Microsoft must work on a conventional calendar, so they've never been able to accomodate modern calendar innovations like a 13 month, or 32 day or 445. Those columns can also be different regions like north east south west, or different teams of people like lakers, celtics. The possibilities are many. My sense is, no. Microsoft doesn't have a concept that deals with data in the aggregate. They want you to address it from the transaction up, which makes it twice as slow because if you want to do sales 2015 vs 2014, you'd have to pull it twice. They probably have some patented concept to cache it magically rather than trust the user to just use the aggregated data explicitly. Alas... Well, it is free...
- v-huizhn-msft8 years agoMicrosoft Employee
Hi Ffitzpatrick47,
You can add a field in value level of visual, then use the "Quick measure" to display expected result. More details, please see: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-quick-measures/
Best Regards,
Angelia- Ffitzpatrick478 years agoHelper II
Fantastic. Show me what it does in excel 2013 because billion dollar corporations won't let you put up corporate data on the web or install power bi if its not official like excel is. You can verify this yourself if your working at Microsoft. Try to use libre office and pipe into a downloaded version of post gre or even better, amazons free postgre service
- v-huizhn-msft8 years agoMicrosoft Employee
Hi Ffitzpatrick47,
Have you resolved your issue? If you have, welcome to share your solution or mark the right reply as answer. More people will benefit from here.
Best Regards,
Angelia