How to change classic Pivot Table layout using xlwings? - xlwings

I want to change Pivot Table layout to classic layout
In excel the path is as below
Pivot Table Option -> Display -> click classic layout
How can I do that using xlwings?
Thanks

The very simple code below solves the problem:
PivotTable.RowAxisLayout(1)

Related

Slicing the power BI report only by slicers not images

I have a scenario where I am using date and country slicers along with maps in my report along with some stacked charts.
When I click on the map for one country it filters the data based on that country I have selected but the filter is not reflected in slicers.
Is there any way that I can use the map only to display the counts without having select, in other words, no selection allowed on the maps?
Any suggestions would be helpful.
Thanks!
Go to Format tab and select Edit Interaction option as shown in the below image. Now select your Map visual and set Filter = None in other visuals you don't like to interact when click on the Map.

Using a hierarchy from one table to another

!]1
Hi I am doing a graph with data from one table , I would like to use in the filter a hierarchy from another table but I don't know how to do it.
Anyway could help? I just begin in Power BI
It looks like you already have a relationship established between the two tables. If you just want to use the fields within the hierarchy as a filter, you can drag and drop the fields into the filter pane and use it there. If you want to use a slicer and the entire hierarchy, you would have to use the "Hierarchy Slicer" from the marketplace. If you haven't imported visuals from the marketplace before, you can do it by clicking on the three dots (...) at the end of the "Visualizations" pane and selecting "Import from marketplace". Then search for Hierarchy slicer and import it.
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380820?tab=Overview
Hope this helps.

Show/Hide column in Power BI Table/Matrix visual

Is there any possibility to show or hide the column in Table/Matrix visual in Power BI report by user dynamically?
For Example, I have a table view with columns COLUMN-1, COLUMN-2, COLUMN-3. Now I may have filter drop down to list all the column headers, so based on user selection (Multiple selections) Table view should get adjusted to show column values.
Since Power BI was developed based on Excel, curious to know if we are having Hide/Show column based on any condition or available in visual by default (Maybe by right-clicking on column header then show/hide it).
You can do this with the following workaround:
Create your page with the table showing both columns.
Create a bookmark, uncheck "Data"
Duplicate the page and remove the column you want to conditionally hide. Set the page as hidden.
Create a bookmark, uncheck "Data"
Add a button to the first page pointing to the 2nd bookmark
Add a button to the second page pointing to the 1st bookmark
Ensure your slicers are synced
The end user experience is they will feel like they are conditionally hiding and unhiding the column.
A bit crap and a lot of extra work but I have it working well in my implementation.
Currently it is not possible to hide columns in visual based on slicer selection, there is an idea about this issue, please vote it up.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19435267-conditional-visibility-of-a-visual-based-on-slicer
Thanks!
This is now available in Power BI with preview feature "Field Parameter". Check the May 2022 update.

Power BI - Numeric values displaying on a grid map image based on slicer selection

Hi all Power BI experts,
I have a PBI report looks like below. The map on the left is an image. The data on the right comes from DirectQuery.
The users request to have the T Values to be displayed on the map next to the grid IDs dynamically based on the menu option they click on.
Is there anyway to achieve this requirement? Thank you.
It can be used with "Synoptic panel" downloaded from PBI market place. The creator is okviz. Here is the URL for the visual: https://okviz.com/synoptic-panel/
You could put a card in each rectangle with a different measure for each Grid ID.
Not an elegant solution, but I don't know that there is a good way to do this if you just have a flat image file with no programmatically defined way to map Grid ID values to map sections.

Adding fields to datasets through GUI in SAS EG

I would like to add a couple of fields to an existing dataset in SAS EG. Can I do this through a properties dialog, without having to write code?
If you are in Update mode (easiest way - double click on any cell, choose yes), you can right click on a column header (the variable label up top) where you want to insert the new one and select "Insert Column".
you need to open table (douple clic on it) and try to edit (double click on the row filed) -> in pop up window select to transfer table in update mode. After its done, select whole row and in right click menu u will see add or delete rows options.
p.s. you can also add coloumns via similar manipulations.