Best Approach for Bookmark Drill through in Power BI - sql-server-2008

I have a single session date(Day) chosen on the Dashboard home landing page ( page 1) via a dropdown date slicer. The chosen date is a selected date measure defined as:
SelectedDate = cALCULATE(max('Date'[DayTextLong]),FILTER('Date',SELECTEDVALUE('DateSelector'[DateId],MAX('DateSelector'[DateId])) = 'Date'[DateId]))
DateSelector table is a standalone disconnected date table that is a cutdown list of dates for dropdown to select a day for slicer. There is a connected DATE table in this data model.
On a scorecard on the Dashboard home landing page ( Page 1), for a daily amounts on sessions I have a bookmark( as cant drill through on scorecards), to a details table and on that page 2, I want to show the details of which customers. This is from a table that contains a request date and I need to filter the table by the selecteddate measure . How can I show a summarised table visual on Page 2 that filters from the Selected Date measure chose on Page 1?
I was trying to create a measure (Request Date Boo) that would set a measure to 1 or 0 for the relevant records to show from Session Requests table , which is just Session Name, Customer Name and request date , and then put a visual filter on for page 2 to say where Request Date Boo=1. This fails with an error around single value not being found as it telling me I need to aggregrate the request date.
I want to do this properly and wondered what is the normal way of showing a visual on page 2 of a Report , where you want to use a date and apply a filter to another table in the data model using that date.
Hope the question makes sense.

For what I understood, you have a filter on page 1, that must be kept when you navigate to page 2.
I've got three options:
Put the same date filter slicer on page 2 and allow it to sync with the others. In this way, when you navigate between pages that share synced slicers the filters will be kept. (this was also suggested by a comment)
Use the drillthrough functionality (docs here). This is a bit more complicated and does not create a "standard" page but it allows you to navigate to a detail page, based on a set of configured fields, when you navigate to this page you can also keep all the filters that were set before reaching this page. (This is a bit complicated to explain, the best thing you can do is to try it and see if it suits your needs)
Use What If parameters (docs here). I've never used for something like that, but if you can use them to choose a date you may use them to solve your problem.
All considered, probably the first solution is the easiest and most common solution for this kind of problem

Related

Is there a way to show a dynamic information datatable report in an order defined by user in jsp?

I have information stored in mysql database which i am showing in a datatable report. I want an advanced functionality wherin user gets to select which columns he wishes to see and also gets to select the order of columns in which he wishes to see the report. Is this even possible ?
At present, i have reached to a point where user can define the columns he wants to see and every time he logs in, he gets to see those columns when the report loads.
Currently the challenge is showing table columns as per user defined order.
I want a road map to achieve the goal of giving user the facility to define the order in which he wants to see the report and see only those columns which he wants and in the order which he likes to see every time he logs in and uses the software. What do i need to do in my front end and backend ?

Access - preview what an update query will change

I am using Access to update values within a sharepoint list.
I have the sharepoint list linked as a table, and an excel file with the changes also linked in. These are linked by Purchase Order Number.
I can do an update query and it will update the appropriate values into the sharepoint list. However I would like to "Preview" my changes before I commit them.
What I would like to do is:
Show the purchase order number (key that is common to both lists)
Show the value currently in the sharepoint list
Show what it will be updated to
Then finally tell it to go ahead and make the change
I know this is a basic question but searching doesn't seem to come up with anything similar.
Simply use a select query with the SAME criteria and send the results to a continues form with a “update” or “cancel” button. If the user hits ok, then you run your update/insert query as opposed to the select query that is displaying the data in your current form (or even report).

Identify row index of specific row within dataset by reference to the principal key

I have a table "documents", with an id column, which is the principal key. The table has numerous other fields and users can view the table sorted by reference to many of these fields. The table data is displayed within a virtual tree control which requests only the data it requires for the current client area of the tree.
Say my document table had the following structure and data (it doesn't, but the simple eg below is hopefully suffucient to illustrate)
id description date_of_doc
----------------------------------
1 Doc 1 10/05/1987
2 Doc 2 11/06/1988
3 Doc 3 12/07/1989
4 Doc 4 13/08/1990
5 Doc 5 14/09/1991
6 Doc 6 15/10/1992
My virtual control loads the date in id order is as per the default table order.
However, the control allows you to click on headers which are called "description" and "date_of_doc". Clicking on these headers changes the order in which the data is displayed in the control. Click the same header twice and it will sort descending. I issue a new query to get the data with an "ORDER BY" command depending on what header has been clicked.
So if I am sorting by date_of_doc and it is descending then the new position of id 2 is in fact 5. Having sorted my user then clicks on the "Find by ID" link to find the document with the id "2". I now need to take him to the correct node within my tree control to find this document. From the simple dataset above we can work out that the new index of this position within the tree is 5. But how do I do that with a query taking into account the Order by clause.
Currently I am selecting the id field for every row in the table using the same Order by and then iterating through the query result until I can match the document id with the id requested by the user. There is nothing wrong with this query in the sense that it gets me the correct position, it just strikes me as grossly inefficient especially as I need to work with large tables.
What I am looking for is a query which is something like
SELECT row_num FROM documents WHERE id=12345 ORDER BY date_of_doc
However, the control allows you to click on headers which are called
"description" and "date_of_doc". Clicking on these headers changes the
order in which the data is displayed in the control. Click the same
header twice and it will sort descending. I issue a new query to get
the data with an "ORDER BY" command depending on what header has been
clicked.
This is not very efficient as it needlessly hits the DB everytime someone tries to sort columns. You can retrieve data once per usersession and either cache the data on the Web Servers Memory and sort it in memory. Or use some client side sorting techniques using many javascript libraries ... Iam not an expert on these techniques but you should be able to find help on this topic as it is a very common scenario. Also you haven't mentioned what technology stack you are using to build your web app. C# asp.net, java , php, etc ...
So assuming that we are sorting in memory the only other call to the db would be to fetch the document for the particular requested document.
That said for your immediate need to avoid iterating rows to find
To do that you can write a Stored procedure that takes the DocID and returns the recordset like so ( just pseudocode may need to tweak it for your actual scenario ) :
Create GetDocDetailsByID
(
#id int
)
Begin
select id, description, date, ....
from yourtablename
where id = #id
End
You should have that doc id in your application at run time when the user performs a button click or hits a hyperlink. Call the above SP with that ID. this part is platform specific. So let me know what is your front end platform and we can see if that needs tweaking.

SSRS report with "Checkbox"-like feature that adds filters to query

I have a SQL database and using SSRS to produce reports. They are both 2012 version. The data is well water levels that are record every hour. Originally I have the report displaying ALL of the data for a user selected well (dropdown list). The user can also select the start and end date (text box) But the well levels don't change that much every hour unless there is a significant rain/flooding event. So I want the user to have the option to choose only the noontime values for each day. Is there a way to have a checkbox that would either 1) change actual query the report is using or 2) include filter that says only display 12:00:00? The parameter options seems to want to include a date and I only want to filter by time.
Thanks
I think the solution for you is to add a parameter to your report to be able to select what information to show with 2 possible values - All / Noon only. Then add a new field / calculated field to your dataset to indicate which ones are noon values. Then use the new parameter to filter the values showed in the report.
Hope it makes sense.

Access Form Field Logic

I'm trying to make access conditionally only show rows that meet a certain condition, allow me to give you some background info before I proceed :
I've created an Access form and linked it to a test DB on my machine. The particular table I am interested in contains the following (important) rows :
ID , Office, Name, SecurityNumber
The thing is, ID is not unique. There are two Office locations, and each Office has it's own set of unique ID numbers. This means that ID 10 here and there may or may not be the same person. (this data comes out of a legacy security system we're not looking to change yet, so I cannot change it)
But ID -is- unique to each Office.
SO! I created an Access form with TABS! Two tabs, one for each office. What I am trying to achieve now is :
Have the ID/Name/SecurityNumber fields for each tab populate with only rows that match it's particular 'Office' value.
Thank you for reading and thank you for helping! :D
If you want the data for the office locations presented in separate tab page controls, you could use subforms on the pages which differ only in the WHERE clause of the queries used as their record sources. So for the Office1 subform, the query could be:
SELECT ID, Office, [Name], SecurityNumber
FROM YourTable
WHERE Office = 'Office1'
ORDER BY [Name];
Then for Office2, the query would be the same except for the WHERE clause:
WHERE Office = 'Office2'
As I understand your question, that approach would do what you're asking for.
However, that's not really the easy "Access way" to do it. Instead consider a combo box control to allow your users to choose which office they want to view. In the code for the combo's after update event, either modify the SELECT statement used as the form's record source or create a filter expression an apply it.
Also, since you're pulling the form's data from SQL Server, consider whether you want your form to load every record for the selected office location. It may not be much concern if you have only a few to moderate number of rows for each location, but if you'll be dealing with multiple thousands of rows it could be. In general, you should try to avoid pulling copious amounts of data across the wire; pull sparingly instead ... only what you need for the immediate task at hand.