DirectQuery with parameters PowerBI - sql-server

I try to create report and have some table with some values my purpose is when clicking on some row of table it should drill through to other page with line chart, my question is I have column EventTime and when I click on some row it should drill through on line chart where as X axis will be time and that time should have range +-5 minutes of EventTime column how can I make this? Is this possible to create DirectQuery SQL statement with parameters and if possible how can I change this parameters depends on filtered row column EventTime or there are some other possibilites?
Kindly thanks for all answers!

For the moment I don't think they have exact solution for this, I also tried to do similar thing, Unfortunately couldn't found useful resource.
Try some custom visualizations, in import more visualizations, Obviously most of effective ones are paid versions, But you can do some stuff from free versions.

Related

Dynamic SQL SSRS and Dynamic Row Grouping

I have a dynamic SQL query that have dynamic column names. ( The resultset is then pushed into a tablix very similar to this setup(https://www.youtube.com/watch?v=BB9wvvkDY7Y ).It works fine. However, I need to establish a grouping on the row in SSRS. Due to the dynamic nature, the fieldname is not available before run time and therefore I cannot set a group on the row. I have tried several workarounds, using parameters like :
=JOIN(Parameters!DynamicGroup.Value, ", ")
(it is a multivalued field), but I cannot seem to get this working. At best, I get 1 row returned.
I may not be clear on this, but what I need is to be able to use the grouping when exporting to excel to have each group create a new sheet in the workbook.
Any help would be appreciated.
Thanks for the replies. I figured out what why I am only getting back a single row. It is because of the way the dynamic query is pivoting the resultset and then grouping it to display all columns(marked with number) as a row. So all fields with the same number becomes a row. When I add another grouping it is taking this qrouping, hence there will only be one row because it is unique(pivoted).
This leads me to think that I cannot get this done this way. Is there a way that I can have dynamic column names (based on Dates)? There will always be the same number of columns returned, but the content will different. I googled this, but I have not found anything that really solves this issue.

Power Pivot - Timeline linked to native Calendar Table can't be inserted anymore

I'm building a model in power pivot, and have so far 2 tables retrieved from API calls. I added a calendar, linked it to my tables, and it was working fine. I was able to add a timeline linked to my Calendar date field (not fact tables date fields).
Link to the Calendar table are seen by Power Pivot
Then I updated the range of dates of my Calendar table, to go further in the past, and further in the future. Since then, when I try to add a timeline linked to the Calendar date field, nothing happens. It's weird, because Power Pivot is seeing the relationship with the calendar table, when I add the Calendar date fields in the power charts (see image 1). It's really the timeline that's not appearing anymore. If I try to add original date fields from fact tables, then the timeline adds correctly but that's not what I want.
Steps to update Calendar date range
Clicking Okay does nothing, when it usually adds a timeline
I don't know if it's a bug in Power Pivot or I broke something?
The Excel model is below
Data model, with relationships to Calendar table
Okay so I found the solution to my problem after 3 days of research. Basically by adding the timeline outside of a pivot chart, linking it to my calendar table, instead of not showing anything, it showed the error message pretty much saying that dates were not supported in Excel. So then I figured my date format was correct as it's the native calendar table, so it was probably a problem linked to the range. After a few tests, it seems anything before 1900 is not supported in the timeline, same goes for after 2099. Adjusting the range fixed it!

how make chart (with optional date range) independent from chart table in one Datastudio report?

I have this Datastudio report with one Chart (with optional date range) and one table showing all cases.
Issue is that when I change date range for chart, it also change table values accordingly.
I understand this logic, but what if I want have one separate table showing all numbers of all time next to this selectable time chart.
Is it even possible?
So can I have two data objects independent in one report ?
https://datastudio.google.com/reporting/23ff0aaf-629c-495b-a629-a92d52af15e9
here is website with all reports
https://webcovid19.live/
Nimantha's answer is a valid approach. However, this approach can be used only for the date range filter. If you change the Country/Region filter values, both charts will get updated.
If you want both date and dimension filters to apply to certain charts, you can simply group them. From the official help docs: Restrict a filter control to specific charts: "To do this, select the filter and one or more charts. Then use the Arrange > Group menu (or right-click and and select Group). Now, the filter only applies to the charts in this group."
Groups
Minhaz Kazi's solution on Groups would be the way to go.
For future reference, adding a Google Data Studio Report and a GIF to elaborate on the method:
Original Post
It can be achieved by setting the Default Date Range of the Table to Custom and then setting the Date Range as required (in this case, the default, Auto Date Range will do the trick).
Google Data Studio Report and GIF to elaborate:

Values from Analytics different in a table than a time series

I'm having an issue where the figures pulled from Analytics are different in a table format than the time series.
As you can see in the image below the 'Nutzer' (user) value in the table for Sep 2019 is 6692 but on the time series is 7789. This then affects the calculated values for 'Umsatz pro Nutzer'.
Does anyone know why this happens and how to stop it?
I think the most likely answer is that there is a filter active on one or both of the objects that is altering the displayed data.
To test this out, create a copy of the sheet and delete the chart. Then make a copy of your table and change it to a time series using the chart options. I just did this process using a connection to the GA property for our mobile app and I see identical data for users for both the table and the time series.

Finding difference between columns in column group

I am using report builder to create a report showing a budget for a project. The dataset includes line items for both budget and projected. See below for example rows. I am using a matrix with column group to display budget and projected side by side as well as a row group to show section, category, etc. I need to have a variance column that subtracts projected from budget.
I have scoured the interwebs for solutions but nothing that has worked so far. I feel like there has to be simple solution to this given it is something that could be done in a sql query with zero effort. Most solutions are assuming I have two separate fields, but these are dynamic fields pull out with the column group.
Dataset Row Samples
Type Section Cateogry Phase Task Total
Budget Building Kitchen Pre-Construction Cabinet Hardware $100
Projected Building Kitchen Pre-Construction Cabinet Hardware $220
Report sample
COL GROUP This is the column i want
Budget Projected Variance
+Buidling $100 $220 -$120
+Kitchen
+Pre-Con
EDIT: I tried the below solution without success and have already visited every link provided in the second answer. Maybe there is something I am missing, but I ended up just doing everything in the SQL query and not use Column groups. This is 100% the simplest solution. I am very surprised there is no easy way to reference individual columns in a column group. The below may work for others, but I just could not get them to work for me. Not sure why.
You could add an additional column inside the “Type” group (provided that this is the name of your column group). Set the Column Visibility to hide the column by an expression like
= IsNothing(Previous(Field!Type.Value, “Type”)
Calculate the values for that column as
= Previous(Sum(Fields!Total.Value), “Type”) – Sum(Fields!Total.Value)
That should calculate the difference between the values of the previous type and the current type, and
only show that column for the "Projected" type (when there is a previous type).
On the matrix, you can use the group subtotals to achieve this, you only have to overwrite the SUM operation with an expression that subtract to values. There are many link mentioning how to do that or that can helps you:
How to add calculated column from dynamic columns to a matrix
Adding subtotals to SSRS report tablix
How to write Expression to subtract row Group SubTotals
Reporting in SQL Server – Using calculated Expressions within reports

Resources