When I use COUNT in MySQL, for example, Mrs. Aretha Salas gets 18 movies, but in powerBI, using COUNT says 20 movies. 18 movies is the correct value. How do I get this resolved?
In MySQL
In PBI
In PBI
For Power BI to be coming up with a different figure, there will be a join to another table or a second row (possibly duplicate) in your film table increasing the count.
Brake the table into a separate Power BI workbook and perform the same test. If you are still getting the same result in your new workbook, turn the visual into a table and that should explain how the count is coming out incorrect.
Related
I have a db of some 20k error code entries, and i would like to generate a report that show
how many of each is stored.
The user creates a entry when working on a specific error and they get it from another table
example
I tried creating Queries with the selected data for the report and then using the report wizard to help.
but the SUM function add's the codes together, and the count records counts ALL together.
I am looking to create a report that i group by "Area" which is working fine.
and under each area i den count "example from the screenshot" like this
Error: - >
Do you have any idea's or is there report software that can help me achieve this?
EDIT:
One solution is i found is -
https://support.microsoft.com/en-us/office/count-data-by-using-a-query-b84cdfd8-07ba-49a7-b067-e1024ccfcca8
Count records in a group or category
But then the problem is i am missing a column with the actual reference of the AlarmNo because now i am counting them, and i am still insterested in getting the Original number.
AlarmNo - Count of these.
Sorry i cannot share data or tables not my data.
Allright i found out what i was doing wrong, it was my sql query.
I changed the queries for each area like this.
This one for England, and it now works when i generate a report.
What i was missing was the "Count" AS CountOfAlarmCode.
Thank you for looking anyway.
´´SELECT Data2020.[Country], Data2020.[Site], Data2020.[AlarmCode], Count(Data2020.AlarmCode) AS CountOfAlarmCode, Data2020.[AlarmText]
FROM Data2020
GROUP BY Data2020.[Country], Data2020.[Site], Data2020.[AlarmCode], Data2020.[AlarmText]
HAVING (((Data2020.[Country])="England"));´´
I have 6 Datasets each one is the same query but has a different WHERE clause based on employee type. They generate 6 tables. At the top of the report there is a summary table which uses reportitems!textboxXX.value to grab the totals for 2 particular fields from all the tables. I'm also using a StartDate and EndDate parameter. Each reportitems! expression in the table comes from a different dataset in the report if that is relevant.
When I run the report using dates from yesterday back to the 9th of May I get the desired output.
But when I go to the 8th I get multiple rows all the same.
and as I go even further back I get even more rows of the same information. To my knowledge nothing interesting or different happened on the 8th of May and the tables further down the report look exactly the same. Any idea what might be causing this? The design view looks like this if that helps. There's no grouping or filters on the table.
Still not certain about the mechanics behind this but I found a 'solution' so I figured I'd post it. I just made a new dataset for my summary tables where the query was simply SELECT 1. Now I get a single row every time.
I have two Datasets in my SSRS report and both dataset coming from different database. and there impossible to join them
Example not real Data .....
so what im tring to do is (Dataset1) total number of Visiter divided by (Dataset2) Total number of Cars * 1000 (sectors) row group by every month and Year.
for example (not real) if we have 24 Visitors and 2063 Cars *1000 so we get AVG of 1000 Sectors 11.63
Is there any funcation in SSRS where i solve this problem IN Excel you know i easy but I need to create report in SSRS please any help would safe me. Thanks
enter image description here
The lookup function in SSRS allows you to get fields from a different dataset based on matching criteria.
See here for more information: https://msdn.microsoft.com/en-GB/library/ee210531.aspx
So I have these 2 lists in SharePoint i.e. Producer & Movies.
Now I need to create a single dataset with information about a producer (Name & Nationality) and a count of his/her movies. So an example record from the dataset should look like this for example: Steven Spielberg | USA | 20
I have been looking for way to do this but I couldn't find anything. Everything I tried resulted in an error on the report at runtime. Like when I tried to use a LookUpSet-function that should have worked if it were allowed to use a LookUpSet-function in a DataSet.
Does anyone know how I would be able to achieve something like this?
Sorry if I'm not clear with the title but I didn't know how else to describe it, so any suggestions are appreciated as well. :)
Kind regards
Gravinco
By default, we can only get values from one list in one query, which means we can only have one list in one dataset. Even you can create a calculated fields to return the related movies of the producer, it's still not supported to use aggregation function in it to get the count value. So for your requirement, You have to create two datasets and do the aggregation on producer group level in table.
I have a stored procedure that returns data in this format:
Location MorningSales NoonSales NightSales
A 12 6 32
B 20 43 12
I have my table displaying the above data in details (not grouped) format. I now want to add a sparkline at the end of each row, using the numbers in those three fields.
They should look something like this:
I just cannot for the life of me figure out how to setup category groups for each field.
I was able to have this result before by bringing in the data as multiple rows for each Location, i.e.:
Location SalesTime SalesCount
A Morning 12
A Noon 6
A Night 32
B Morning 20
B Noon 43
B Night 12
But for the purposes of speed, I had to pre-calculate my sums and avgs in a stored procedure, since SSRS seemed to take forever and a day to render the report when it calculated the aggregates itself.
Is there any way to pull off what I'm trying to do here?
I think my question is similar to this one:
SQL Server Business Intelligence Studio: Line chart from single record
The accepted answer there is to rewrite the sql query and end up with something similar to the second dataset I showed here. If it can't be done any other way then fine, but I don't mind hacking and rigging to make it work for my situation.
Hope below link helps you in finding the solution:
http://www.sqlcircuit.com/2012/11/ssrs-how-to-add-sparkline-in-tabular.html