Oracle Apex 22.21 - How to refresh multiple regions with one dynamic action - oracle-apex

I have two charts on one page. There are also two datepicker items (Date From and Date To) so the user can choose between two dates and get a range of values.
I understand how to implement the datepicker for one chart and it works for me as expected. But how can I have the datepicker refresh the both charts at the same time?
I've found another SO question and followed Daniel's answer to give each region a static id.
So I've added the static id of region1 to the first chart and region2 to the second chart.
Then, I changed the datepicker dynamic action selection type to Javascript Expression and added the following
apex.region('#region1').refresh();
apex.region('#region2').refresh();
But the refresh doesn't fire when I choose a new date.
Daniel's answer in the other question did mention a JS API. Is this something I link up with Apex or is it already included out the box?

How to refresh multiple regions with one dynamic action
I presume/hope that this should do:

Related

How deselect a radio button on select of another in power bi?

I have used chiclet slicer to achieve radio button,
In my case from 3 measures I have taken 3 chiclet slicers, While clicking on a single radio button it is working fine, but on selecting another how to deselect the other two radio buttons.
I have data in 3 different measures "daily", "weekly" and "monthly".
My requirement is on the select of any those rest two options should be deselected, which is the default behavior of the radio button.
Or you can suggest me if there is any other way to implement the radio button.
I've always achieved this using the standard slicer and a hidden table with the needed labels and/or values.
Create a table by using "Enter data" or by using DAX, and put in it your 3 labels "Daily","Weekly","Monthly", I will call the table "MyTable" and the column "SwitchLabel"
Create a slicer with field "SwitchLabel", in the selection control enable "single select". (you can change the orientation in the "general" section).
Create a switch measure like the one below:
SalesSwitch = SWITCH( SELECTEDVALUE('MyTable'[SwitchLabel])
,"Weekly", [WeeklySalesmeasure]
,"Daily", [DailySalesmeasure]
,[DefaultMeasure] --optional "else", if nothing matches or there are multiple selections
)
Put the "SalesSwitch" measure in the charts.
The slicer/filter on the "switch" table must be present on every page that uses the measures, otherwise (without filter), it will always fall in the default case.
One limit of this solution is that it cannot change the X axis, in fact you are just calling different measures based on the selection.
If you need to also change the X-axis use Seymour's method with buttons and bookmarks.
There are many ways to implement the same need.
Buttons + Bookmark (built-in)
Slicer + Switch (built-in)
custom visuals in the store
In general, I prefer built-in Power BI functionalities because for enterprise production solution you do not want to rely on custom tools not officially supported by the software vendor.
Therefore, if your project is a real work then my suggestion is to use the Buttons + Bookmark built-in functionality. For your case you need:
Buttons
Bookmarks
In practice, create 3 buttons: Daily, Weekly and Monthly.
Next, create a bookmark with the default view, calling it Default.
Then, update one bookmark for each of the three view. It could simply be hiding or showing a visualization in the same page. Please note that a hidden visualization will not trigger any computation when the page is opened.
Finally, set the action of clicking the button to direct the user toward the bookmark.

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.

How do you create a parameter list drop down in Power BI?

I have always been able to create drop-down list parameters within SSRS that allow the user to dynamically filter their reports based on one or more values selected from the drop-down list box of multiple values.
Translating now over to Power BI I cannot find any documentation to achieve the same functionality.
I've found a method of turning the slicer into a drop down list box. But it only allows for the selection of 1 value at a time. So it essentially seems to me to be more of a drop-down list of radio buttons.
In SSRS I could create a stored procedure that accepted a value and returned a record set filtered on a specific value(s).
I can see how to do this with Power BI as well but the method I've seen demonstrated, forces the user to select a value before the report is loaded and subsequently loads a pre-rendered report template. Which isn't the same.
So how does one go about creating a report that implements a true drop-down list box allowing for selection of 1 or more values to dynamically generate the result in the report?
Reference links are welcome if a simple answer isn't possible.
This is an out-of-the-box feature in PowerBI
Create a slicer visual and, as you've already discovered, set it to Dropdown type using the upside down carrot icon on the slicer header. The dropdown list is multi-select by default. Hold down [ctrl] while making the multiple selections. However, you can control Multi-Select behavior under the 'paintbrush.' When the visual is active, click the paintbrush icon under visualizations, expand 'Selection Controls' and you will see several options to manage your slicer's behaviors.
Additionally, you may want to explore the new filter experience, which is still in beta. https://learn.microsoft.com/en-us/power-bi/power-bi-report-filter-preview
Otherwise, The behavior in SSRS where the report loads from data sources using parameters chosen by users either as parameters in stored procedures or incorporated into dynamic SQL is not replicated in PowerBI. It's true that there are parameters that can be incorporated in that way with the data set refresh - but these are controlled on the data set, not the report, and are not convenient (or appropriate, really) for report viewers to manipulate.

Detail to detail drillthrough in Power BI

I have a Master page in a Power BI report with a list of IDs. For each ID's there are multiple detail pages set up as drillthrough pages - e.g. Overview Detail and Usage Detail. Each detail page takes in an ID and you can drillthrough from the master page to get to either.
What I would like to do is link the detail pages to each other. So I have filtered in ID 1 and looking at the Overview Detail and I want to have a menu or link to "See Usage Details" which would drillthrough with the same ID to the Usage Detail page (and vica versa). I could then break my detail pages up into a whole set of pages and almost have a tab menu on each to explore a particular ID.
I tried tables with hyperlinks (and querystrings) but it was getting really messy. The button links and bookmarks cannot take in a dynamic drillthrough filter.
Is this possible to do?
I think you can achieve that with bookmarks.
First thing would be to create a bookmark, which takes a user to the desired page (from drilled page A to drilled page B). Bookmarks can be found here:
You need to turn Data and Display options off. The bookmark should only move a user between pages. Add button to Drillpage A with the bookmark as an action. If you need it both ways, do the same thing with Drillpage B.
After that, add slicer with IDs (column you use to drill) to both Drillpages and mark sync between them to True (option dialog should pop up when copypasting the visual, or turn ON sync pane here:
Then just hide both slicers so the user is not aware of them (via selection page - turn on just over Sync slicers option). I think the slicer should keep the ID, which was used to drillthrough into the page, thus providing the desired behavior.
Another option that comes into mind, is to make a small drillthrough table, which would contain only ID column, so a user could use it to drill from drillpageA to drillpageP, but I've never found it user-friendly.

Totals not changing with repeater filtering

We're migrating from NAV 2009 R2 to NAV 2016 and I'm having an issue with a page.
I have a repeater with several columns the user can filter. There a $ totals in the group below the repeater that should change based on what is presented within the repeater grid after filtering.
Thanks for any insight anyone can give me.
Try adding a "totaling" procedure (that will add the values from the current record to global variables which are displayed at the bottom of the page) and call it from the OnAfterGetRecord() trigger.
You can try to make a FlowField in the table that your page is based on. The FlowField should Sum the columns you need and then just add the newly made field to the group in your page. Ofcourse you would have to keep the filters in mind.
The other option is that you make a global variable (for example Total) on the page and a function that calculates the total sum of a given column or columns and stores it in the variable. Add the variable as a field within the page group and also make sure the value updates after any change.