Excel Pivot Table: Open URL with Pivot Table Settings as Parameter - excel

I have an Excel file that connects to our customer database. In there, I can break down the number of customers using a Pivot table. For instance, I would see that there are X female customers of age 18-25 who live in the US.
What I'd like to do now, is take this number X, turn it into a link that, when clicked, opens a web browser window to a web application which is also connected to the same customer database and does something with this specific customer segment (i.e. builds a contact file for a newsletter application etc.)
I have no idea how this can be done. I assume that it may be possible to add a custom button to the Excel toolbar which would extract all the current pivot table settings so that I can send them as URL parameters to my web app. Is this possible? If so, how is it done?
Can you help me in the right direction please?
Thx a lot!

No need to create buttons if you dont have to.
You can use the HYPERLINK() function and concatenate the URL out of text and cell values.
So for example the URL for this page in an excel cell would be:
=HYPERLINK("https://stackoverflow.com/questions/"&A1&"/excel-pivot-table-open-url-with-pivot-table-settings-as-parameter")
Where cell A1 = 18843796
18843796 being the id for this question. You can do this with as many parameters as you want.
This will create a clickable URL which will automatically open your default browser.

Related

PowerApps -If LookUp() is NULL with external data source - Power APPS BREAKS

I have a PowerBi report with several data sources, SQL query and Excel connector.
The SQL data data on our Products whereas the Excel is living data on salesperson notes on said products.
The PowerBI has a PowerApp visualization. The Power App has 3 pages:
Page 1 is landing page that Gallery displays data from PowerBi
Page 2 is a form edit page to edit notes in the Excel spreadsheet that we know exists because we saw those notes in the PowerBi report
Page 3 is a form edit page to add new notes in the Excel spreadsheet that we know we have to add because we did not see them in the PBI report
On Page 1 are two buttons, "Edit" and "New" that navigates to the proper page.
Now here the WTF moment
IF the Product has notes and the user clicks on the NEW button, then PowerApps adds the line to the Excel spreadsheet, causing duplicates and thus the PowerBi report cannot refresh. It breaks.
If the Product does not have notes and the user clicks on the EDIT button then PowerApps does a LookUp(ExcelSpreadsheet, Column=Gallery1.Selected.PowerBiValue which results in a NULL value and thus breaks with a dreaded server response: expression "... eq null" is not supported.
If I try to add the 'IsEmpty()' to preemptive counter it, the 'Lookup()' is run first thus breaking before it gets to the 'IsEmpty()', same goes with 'IsBlank', 'IsBlankOrError', and 'IsError'.
I have Googled the living %(#$* out of this and there seems to be nothing on it, as this is in direct relation to 'LookUp' on the Excel Spreadsheet not a dropdown or in app text box that other people have issues with. How is it that you can't even use the error handler 'IsError()' as it breaks before the handler can even have a chance to do anything.
If I use LookUp(ExcelSpreadsheet, Column=Gallery1.Selected.PowerBiValue) in any way, shape, or form, with or without If clauses, because it will eventually produce a NULL result, Power Apps breaks
How do I read null values from a data source?
SOLUTION:
Since the "living data" Excel spreadsheet is also in the PowerBi report, I have PowerBi send the living data values along with the SQL queried product values to the PowerApp. Since the NULL is now a sent from PowerBi instead of queried from Excel within PowerApps, I can have 1 button that's OnSelect property reads:
IF(IsBlankorError(Gallery1.Selected.LivingDataNotes),Navigate(NewNotes),Navigate(EditNotes)

Excel HYPERLINK with INDEX MATCH reference isn’t valid

I have set up a set of forms on excel that can append or update information to an access database.
Due to their being multiple forms, I want to create a spreadsheet, which acts as a hyperlink centre to the form the user needs.
Their are only to ‘branches’ of forms the users can use:
Add new data forms
And
Update Existing data forms
Each of these branches has say, 5 forms (so 10 in total)
The spreadsheet I’ve set up has two tabs
Tab 1 - user end sheet (‘user’)
Tab 2 - list and hyperlinks (‘info’)
On the user end sheet there is a list to select which branch of forms the user wants the link to (Cell D11)
Add
Or
Update
From there a secondary dependant drop down list shows the forms available from that branch (Cell D16)
Finally, there is a cell which I’d like to display the hyperlink to the form they have selected.
I’ve searched around a lot, however I can’t find the fix.
The formula in full is:
=IF(user!D16=“”,””,IF(user!D11=“Add”,HYPERLINK(“#”&INDEX(info!$D$9:$E$13,MATCH(user!D16,info!$D$9:$E$13,0)),(VLOOKUP(D16,info!$D$9:$E$13,2,0))),HYPERLINK(“#”&INDEX(info!$G$9:$H$13,MATCH(user!D16,info!$G$9:$H$13,0)),(VLOOKUP(user!D16,info!$G$9:$H$13,2,0)))))
The hyperlink formulas:
HYPERLINK(“#”&INDEX(info!$D$9:$E$13,MATCH(user!$D$16,info!$D$9:$E$13,0))
And
HYPERLINK(“#”&INDEX(info!$G$9:$H$13,MATCH(user!$D$16,info!$G$9:$H$13,0))
The result simply returns #N/A
I’ve tried:
INDEX
“#&INDEX(…)”
“#”&”INDEX(…)”
And knocking all of the if statements out, leaving only the hyperlink function there.
The hyperlinks work fine in the info tab.
Any help would be massively appreciated, thanks in advance.
Solved.
Issue was that the hyperlinks id set up already had a ‘friendly name’, changed to raw link and then was able to replace index match simply with Vlookups.

Excel Web Query: Replace query URL with value from another table

Currently, the colorful table is using a fixed URL. I want to send a user-defined, complete URL string to this web query, and have it update whenever it's changed.
The large white box is a pulldown list (AN358):
User can choose a new location:
Which brings up a new URL (AN362) which points to a different web table (always same format). In my case, the colorful table does not change since it's currently a fixed link.
To the right, I converted the blue cells into a new table called "TableYear1" (AN361):
In power editor, here is the existing query "Year 1":
In advanced editor, I tried to replace the web link highlighted here:
With the underlined value here. I know the syntax/usage is probably wrong...it's just to illustrate what I want to accomplish.
try replacing the code with this
Source = Web.Page(Web.Contents(Excel.CurrentWorkbook(){[Name="TableYear1"]}[Content]{0}[URL1])),
in your example you pass a string (table name), while you need a reference to that table

How to change text on page dynamically depending on value from another page/ product in Kentico CMS 9.0

Currently, we are working on Kentico CMS 9.0 version.
We are facing some development issue on below scenario:
There is a static message getting displayed on a Success page after
Registration. This Text is written in WebPart -- > HTML Envelop
section - Content after But we want to change this text dynamically
as per User selects the Band category.
Example If User registers for 1-10 Band category, then text message should be displayed as “ Fees $1, 500 / two years”, or if the range of 2-20, then “Fees: $2,500 / two years” etc.
We tried with Macros on this, but not getting the exact solution. Also tried with relating the pages to get value from this Category pages. But no luck.
If anyone has any pointers on this. Or whether it could be possible to do this in Kentico CMS, please let us know ASAP.
If the data the user is submitting is part of the user's record or attached to a user's ID you could do a lookup using a macro or create your own custom macro to do the work for you.
For instance, if the value the user selected is attached to the user's record and they are logged in after they register, you can use something like:
CurrentUser.GetValue("CustomFieldName")
This all depends on what the value is that you're storing. If you're storing an integer or key of some sort to another table, you'll need to get that key and do another lookup to that other table to get the actual display value. Something like this:
var userRegisteredValue = CurrentUser.GetValue("CustomFieldName");
GlobalObjects.CustomTables["CustomTableNamespace.CustomTableName"].Items.Where("ItemID = " + userRegisteredValue);

PerformancePoint analytic grid hyperlink functionality with KPI images

Within PerformancePoint I am trying to merge the functionality of an analytic grid with the imagery of a KPI scorecard. The analytic grid measures contain an action that lets the user jump to a specific edit page for that measure (based on the intersection of 2 dimensions, Line of Business and Month. That edit page is linked to a database, from which an SSIS package pulls information and processes to fill the cube. Is it possible to add a dynamic hyperlink property to the KPI, one that is based on the intersection of the 2 dimensions, or replace the measure value in the analytic grid with images (similar to a KPI indicator)? I was trying to do it using the API, but I haven't been able to see how to access those particular properties (the associated dimension member values).
Well, I had some screen shots that might have helped make things clearer, but don't have enough reputation to add images to a post, so Ill try and explain it in text.
I want to be able to use a hyperlink action expression such as the one below (which is functional in an analytic grid) on a scorecard KPI or baring that, use an image in place of the actual value in an analytic grid (to give it the appearance of a KPI).
/_layouts/GlobalDeliveryReporting/ProjectStatus.aspx?ProjectID=" + CSTR([Dim Project].[LOB].CurrentMember.PROPERTIES('Key1')) + "&Month=" + CSTR([Dim Status Month].[Months].CurrentMember.Member_Value))
In a nutshell:
I am trying to merge the functionality of the analytic grid action with the indicators of a scorecard Kpi.
I hope that made things a littler clearer.
Thank you
I was able to get this working.
With inspiration from :
http://web.archive.org/web/20080305164525/http://blogs.msdn.com/performancepoint/archive/2007/10/05/implementing-a-hyperlink-from-a-kpi-in-a-scorecard.aspx
For those that may need to do something similar, these were the key elements:
Scorecard
I added a hyperlink property, which causes a click event to fire every time you click on a cell.
Web Page Report
The url for the report points to redirect.aspx. It calls redirect.aspx with a query string parameter of EndPoint_URL which contains the dimension information of the clicked cell.
Redirect.aspx
This page is responsible for parsing values out of EndPoint_URL. Once the correct dimension level is achieved, it creates creates a new query string and redirects to the edit page, otherwise it just returns. The EndPointURL ends up looking like this:
[Level1].[Level2].[Level3].&[Level4].&[Level5].&[Level6].&[Microsoft].&[Level7].&[Level8]&[69621]; [Dim Status Month].[Months].[Status Year].&[2015].&[2015-02-01T00:00:00]
In this instance, the values that need to get passed to the edit page are [69621] and [2015-02-01T00:00:00]. The redirect page parses out the EndPoint_URL, if it reaches the correct depth and finds those values, it will send the user to the edit page, otherwise it will just return.
I put the scorecard and the web page report on a dashboard. Then connected them by passing the url and the memberuniquename of the row and column.
The downside is that it starts loading the redirect page everytime a user clicks on the scorecard, although that page is very lightweight, and once I hide the web page report web part clicking through the scorecard only causes a little blip on the screen.
Let me know if you have any questions!

Resources