Finding the max value in Power BI Column - ms-access

I am sorry for bothering you with my issues and I am totally aware that this is probably pretty easy to solve. I also already searched the Internet but I am not able to apply the things I found.
I am totally new to PowerBi but need to fix this issue real quick.
So when I go to "Edit Queries" I have different tables on the left.
In one of them I've got one column for date, one for time and one for power output.
Now I want to find the highest value in "power output" and show this value and the date and time on the dashboard. What is the best way to do this? Add a new column? Add a new measure? And how do I do this? Which code do I need to use?
I really trying to learn by myself but I have literally no idea.
Please consider that I probably won't understand any technical terms..
Thank you very much.

There are several ways to achieve this...
In Power BI Desktop, Open the Report View
Create a new Measure (I called mine MaxValue, Numeric field = Cost)
Enter the formula :
MaxValue = MAX('Table'[Cost])
Add a Card to your Report,
While selecting the Card, drag that Measure : MaxValue to the Fields location on the right.
Edit Queries can also be used by manipulating values in columns, aggregations, etc; but not required here.
See pictures:

Related

The best way to manage database (ACCESS)

What is the best way to organize a big database.
The way it works is that only I am allowed to touch or modify the database but interns help sometimes to collect data, we used to have the whole system excel based, back than we had the macro which by choosing 2 files it will integrate and mark in colors the changes.
How can I create something friendly to use which will update by pressing a button and also will show changes!! I am familiar with the update query, however:
it doesn’t track any changes.
I want to know other options.
To sum up the way of processing is:
I have the database and I need to split some data to smaller files so other employees will work on.
Then I will collect the files and integrate with the existing database, but since we are all human mistakes can happened that’s why I want to be able to track easily changes.
The updates are going to happen often. When I will give the intern a temp. table The possible changes are for example: address, phone number, price, they will do those researches based on current data which they will find online which information has been changed, and they will change the info which is on the temp. table, That is why I want to be able to know what exactly did they found out. Lets say if Product A (product ID1234) used to cost 10$ and today its 12$ from the same supplier. I just want to know and to see that the price for product ID1234 has been changed. Not only to have it updated to the back end database. For quality assurance I need to track which new input they did in relation to the product ID. (some times input by someone else which was done in wrong format or wrong column could affect big time on the quality of the reports)
So this was the explanation for what I need the reports
So in order to make those temp. tables, I want to create a form for it that by choosing region, category etc. and then clicking on a button it will automatically select the relevant records from the database, create a new table/access-file and then copy the selected records to the temp. table. So someone else could work on it...
Next thing is that it would be nice to know how can I create a template for tables, by template I mean to standardize by validation rules. some fields I'd like to have dropbox menu, some fields ready mask for phone number.... etc.
Final part, after they made the changes and saved the file (the temp. table which they were working on), I want to be able to update the back-end database via clicking on a button...
Looking forward to get the best solution!
Thanks in advance J
Michael
Okay for the temp tables thing:
why not split your database in a backend part (having all the tables) and a frontend part which contain the forms and tables the interns need? I'm guessing mostly it is going to be the same so you can even create multiple different frontend's to give to different interns incase they need other tables. There are a lot of articles out there about splitting a database and linking tables.
Then the thing about the record changes not sure is this is what your looking for but it could help, i haven't used it myself so not sure what it exacly does. But this may help you a bit.
http://support.microsoft.com/kb/197592
I would consider taking a look at the BeforeUpdate event for the form. You can trap the old and new values of textboxes if the form is bound to a table. You could loop through all the controls on your form and check for Me.Control <> Me.Control.OldValue. If they don't match, write both values to an auditing table so you can go back and check whenever you want to. I would include the following fields in your auditing table:
ChangeDate
TableName
ControlName
OldValue
NewValue
Then you can query that table any time you want to see what has changed.

**WHY** would I use prefiltering in CRM 2011 report

I was told about pre-filtering when writing reports in CRM 2011 and it sounded like something I should add to my knowledge base so I Googled it and found:
MSDN
PowerObjects
and a whole bunch more. These gave me a good understanding of the how for both automatic and explicit. The one thing I missed though was why. I mean in general the articles said things like context specific or reduce the size of the query but I failed to translate that into the nuts and bolts business case example. For example one of the articles stated that it will greatly enhance your reports but what does that mean to the person in sales running the report.
In other words I could easily add CRMAF_ to my queries but how it makes sales reports better I couldn't explain. Note I used better as that is the word the author of one article used so I took that to mean extra capability not better performance...?
So a quick business case understanding would be great.
Thank You
JB
It's very easy to make an example.
You need to create a simple report to display a list of accounts created starting from a selected date.
You just do a SQL Query as
SELECT * FROM FilteredAccount WHERE createdon => #selected_date
You publish your report and everyone is happy.
One month later there is a new requirement and you need change the report because is necessary to filter also by country (or city, or a custom field)
Would you prefer to edit the report, adding parameters (and change the queries too) or enable pre-filtering and allow the user to apply some filters (based on fields that maybe will be added in the future) before your report runs?

Regarding get automatic columns in sql`

I have basically 50 fields in a table and I want to select this fields from table on a regular basis.
Problem is: I have to write all this 50 fields manually.
Is there any shortcut in intellisence or any other tool where I can get all fields. automatically by pressing tool.
Also guys if anyone knows here extra addons on sql..then please post it here.
I'm a bit late to the party here (answer already accepted) but here goes anyway...
Did you know that you can drag the columns from the table to the editor window in Sql Server management studio?
So to get the columns, you can expand the table in SSMS, click on the Columns item (for lack of a better word) and drag it to the editor window. When you release, a comma separated list of all the columns for the table will be inserted to the editor at the position you point to.
It's not a easy as autoexpanding *, but it's a good little trick when you have lots of columns.
Check this http://www.devart.com/dbforge/sql/sqlcomplete/download.html link.
It may help you. Its a great intellisense tool for sql. Its has all functionality to improve productivity.
try this:
select name+',' from sys.columns where object_id=OBJECT_ID('tablename')
Now you just need to copy the result and put after the select keyword

Access Input textbox on Data Access page with only select enabled to allow filter by searchs

I have a data access page which gets all it's data from a query of another table, problem is all the textboxs I make on the page and bind the Control source to the matching column then don't allow me to input any text in to use the filter option to search all the results.
I don't want to be able to record any information but if I change page properties to from DataEntry = false too true then it no longer displays the whole section of textboxs.
Anybody know of a way round this or suggestions of other simple solutions to display certain data from the table or all the data from the query in the same/similar way as this?
Edit- Original issue which now requires me to find new solution.
I've used DAP quite a bit -- I even built DAP solutions at Microsoft, and they were wildly popular. I always preferred to use the SQL Server flavor of DAP.. and that allows you to use TWO different types of filters, the standard filter property, in addition to the serverFilter property. The serverFilter property is extremely powerful, and it's incredibly nice to be able to filter things in TWO different ways.
Hope that helps
-Aaron MCITP DBA
The original issue has now been resolved but I had also found these 1, 2 links which guide one through a search feature on DAP's.

Grouping by a report item in SSRS 2005 - textbox - any workarounds?

I want to group by a report item, but that's not allowed.
So I tried creating a parameter...not allowed as well.
Tried referencing from footer...failed again.
This is somewhat complicated.
Let me explain:
I have textbox22, it's value is:
=Code.Calc_Factor(Fields!xx.Value, fields!yy.Value...)
This is embedded VB code in the report that's called for each row to calculate a standard factor.
Now to calculate the deviation from the standard factor, I use textbox89, whose value is:
=(Fields!FACTOR.Value - ReportItems!textbox22.Value)/ReportItems!textbox22.Value
Don't get confused between Fields!FACTOR.Value and textbox22.Value, they are different.
Fields!FACTOR.Value is the factor used, textbox22.Value is what it should be (standard factor).
Now I want to create a group which splits deviations into 2 groups, > 1% or not.
So I tried creating a group:
=IIF(ReportItems!textbox89.Value > 1,0,1)
...But then SSRS complains about using report items.
I have run into a similar problem of using report items in the past, but this is a new case!
Any help greatly appreciated.
Have you tried adding a calculated field to your dataset?
Here is how it works:
While you are in the layout view of the report, open "datasets" tool window(in my environment it is on the left).
Right click on the DataSet you are working with and add a field, you can use a calculated field, and build your formula appropriately
Then you should be able to group on this field
-Dan
I'm not 100% that someone won't have some magic solution for this but I have run across similar problems myself in the past. I believe (but could be wrong) the problem Reporting Services is having is that it only renders once and what you're asking it to do is render the data before rendering the grouping which it doesn't do.
The only way I have ever been able to produce the exact results I need is to make the data rendering happen exclusively in the SQL (through the use of table variables usually) and then use Reporting Services merely as a display platform. This will require that your factoring algorithm gets expressed in the T-SQL within the stored procedure you will likely have to write to get the data in shape. This would appear to be the only way to achieve your end result.
This has the bonus feature of separating report design and presentation from data manipulation.
Sorry I couldn't provide a SSRS solution, maybe someone else will know more.