I have a calculated field in a pivot table returning the running total of my period totals (Ending balance of each period). When my period Field in entirely collapsed, it looks great, but when I expand a period to look at individual transactions the calculated field is on all of those rows as well.
I'm ideally looking to see if anyone has a purely pivot settings solution.
I've tried using VBA to clear the contents when the table is updated but run into error 1004 - use field list option to modify pivot table.
I'm currently making the range text white by finding all the required cells then Rng.font.TintAndShade = 0.
I'd also like to keep this WB ".xlsx" format so it's easier for me to send to coworkers.
Pivot Collapsed:
Pivot Expanded:
Calculated field settings:
Future solution thanks to #JosWoolley:
Enable Power Pivot
Import table into the Data Model
Use DAX formulas to generate the expected result
Is it possible to create a sparkline in power bi desktop without using date. for example I have 3 columns which have their own values. I want to show these values in a column which is a sparkline exactly like spark line in excel. I need something like this in power bi:
see this picture
How can I create it? What should be in x-axis and y-axis?
Thanks
Power Bi doesn't work on pivoted (wide) tables like Excel does, but on stacked (long) tables instead. So you have to prepare your data accordingly. You can still show it in wide format afterwards using a Matrix visual. However, to add sparklines like in your example you would need a table that is just filtering by rows. Here you can add spaklines with Value on the Y-axis and Column on the X-axis. The aggregation doesn't matter for your sample data, so leave it to Sum.
I have a list of dates pulling into an Excel table via Power Query. I've then added columns to that table in Excel (i.e. not in Power Query) that pull in values via SUMIFS. I format all of those columns as currency, but when I refresh data via the Power Query, one of those columns keeps re-formatting itself to short date.
The formula in the column is nothing unique, it's just two SUMIFS pulling in data from another table if it matches the date found in the Power Query column. The Sum range referenced in the formula is formatted as currency, so it's not that.
A bit stumped I'm afraid, as I've never seen this before! Any suggestions much appreciated.
I've used Power Query to pull data and build a table. I've set all of the data types within Power Query, but when I load to excel the table switches all data types to "general". The formatting still looks the same but actual data types have changed. Makes it a pain to build pivot tables since all of the numerical values default to 'count' when adding to a pivot.
There seems to be some confusion between data types and formatting.
Data types in Power Query define the type of data that the cell stores, i.e. Decimal number, currency, whole number, date, time, etc.
The Excel worksheet cell property for "General" is a format, not a data type. A cell formatted with "General" will show dates as dates, text as text, decimal numbers as decimal numbers, etc.
A pivot will default to count only when the underlying data type is text, not General.
If you need different formatting in the Pivot Table that you are building from the data, then you can change the formatting for each pivot table column. This does NOT affect the underlying data type.
Edit: PowerPivot will also default the aggregation to "count" instead of "sum" for numeric data type columns, if any cell in the column contains text, blanks or errors. In that case, you either need to clean up your source data, or manually change the PowerPivot aggregation from count to sum.
Edit II: If you're not using the Data Model, then by definition you're not using PowerPivot, because PowerPivot only works with data in the Data Model.
Yes, you can load the queries right into the worksheet, if you are happy with the resulting spreadsheet bulk and lack of Power Pivot functionality for DAX aggregation and table relationships.
Yes, you can build regular pivot tables from the query data in those worksheets, and the default aggregation for a numeric column is SUM(), even if the column contains blank cells (which you could easy enough test yourself, if you just took the trouble and two minutes to create a table with three rows of data, load it in to PQ, load it back into the worksheet, create a pivot table).
You can't do it that way, which is actually a feature not a bug, IMHO.
To format an entire column from a query result, in Excel,
Right-click in a cell of that column, and choose Select - Table Column Data
Format away as normal.
The nice thing about this is that you can have numbers in your query formatted as dates in your worksheet, etc. Also, there are no good ways to display commas in Power Query, but that won't stop you from getting things to look how you want them in Excel.
-
I have a tabular data with values as in picture. I created a pivot table in excel 2007 .How can I get count value of each up/Down for date specified. I tried to by making one column row and other as values but it would not work.
The result would be:
A better solution is to use a countif function on a second tab. something like
=COUNTIF(Sheet1!A:A,"UP")
and
=COUNTIF(Sheet1!A:A,"DOWN")
and copy it across the range of dates.
If you can format your data differently to look like this
Then the pivot table becomes easy withthe following settings