SSRS dataset with DAX and multiple fact tables - reporting-services

I want to create an SSRS report connecting to a SSAS tabular database. This SSRS report should contain a matrix with costs and budgeted costs grouped by years and cost types.
Now my problem is, that the cost table and the budgeted cost table are both fact tables. I do not know enough DAX to get columns from both fact tables. Right now I can only create a dataset with the costs or the budgeted costs.
I thought about two datasets in two matrixes. But that’s obviously not a good solution.
This is a samplee of my (not working) DAX code.
EVALUATE
(
FILTER (
SUMMARIZE (
Costs,
Costs[IScost],
Time[year],
CostType[name],
PlanedCosts[ISplanedcost]
),
Time[year] = 2018
)
)
I don’t think that this is a hard task, but so far, I did not find a solution with DAX and SSRS. I can't belief that this is not possible with DAX. Or do I really need to use, for example, an MDX query?
I would appreciate if someone could guide me in the right direction.

So here is an example based on Adventure Works. It has MDX query for exactly what you want to achive. Just replace the Measures and Dimensions and you will be good
Select
non empty //Non empty eliminates the null combinations
(
[Date].[Calendar Year].[Calendar Year], // Place your Date dimension here
{[Measures].[Internet Sales Amount],[Measures].[Internet Order Quantity]} //These will be the two measures cost & budget.
)
on columns,
non empty //Non empty eliminates the null combinations
[Product].[Subcategory].[Subcategory] //Place your cost type dimension here
on rows
from [Adventure Works]

Related

SSRS group on lookup field

I have an ssrs matrix and have a lookup to another dataset2 field (Jurisdiction)
I want to row group by this dataset2 Jurisdiction.
The problem is that the tablix will work on a non group lookup but will not allow me to group on and display the dataset jurisdiction field.
is this possible in ssrs?
Thanks
As a general rule, it's much better to join subqueries in the SQL rather than using the Lookup function. Both in terms of efficiency and also avoiding the limitation you described in the report design.
If the datasets are truly different data sources, consider using an ETL process to combine them into a single table for the report to use as its dataset.

Preserving row labels where no data exists SSRS Tablix

I have a dataset that shows capacity groupings for grads of different years. Groupings as follows:
0-100000
100000-250000
250000-500000
500000-1000000
1000000+
However for some of the years there are no grads which fulfil any of the capacity groupings. How do I still retain these labels, even if there is no data?
Need
I've seen similar issues posted, but nothing that quite captures exactly what I am trying to accomplish. So far I've tried to add blank rows in the backend SQL by unioning in a temp table to fill all the blank values, but it seems a bit cumbersome/inefficient... Is there some kind of trick within SSRS or does it really just come down to data manipulation with SQL?
-Thanks

SSRS Dataset for KPI, multiple calculations

I am trying to setup a KPI that indicates the total of something in the data set used for the trend data.
In this case the KPI can't seem to display a Sum'ed or Max'ed value, you have to do that action in the dataset query. I already have the data that reports the totals for each day to populate the bargraph graphic on the KPI, and it seems very wasteful to be required to create the exact same dataset again, only changing SELECT DayTotal FROM Table to SELECT SUM(DayTotal) FROM Table
Is there a way to have this calculated dataset be based off of the initial dataset so that I don't have two effectively identical datasets to maintain?

Two Dataset without joining them in SSRS

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

Show Total In SSRS Chart

I am creating a line chart from an Analysis Services cube, with a date category, a count data field, and a status series. Here's a screenshot to explain:
picasaweb.google.com/lh/photo/fP16V4sB18O1xSTrdDV-_A?authkey=Gv1sRgCLHRmcjwtI2mzAE
I want to add the blue total line, which sums all the statuses together.
I don't want to add a "Total" member to the Status dimension, because that wouldn't make sense. I've tried adding another data field and scoping it to sum everything, but I can't figure out how to make the series field only apply to a single data field—so this ends up duplicating all the statuses and getting 8 lines instead of 5.
This should be possible... I don't want to resort to writing SQL against the underlying database.
Alright so I figured out a reasonable solution in MDX. I think it would be better solved in SSRS, but I haven't figured that out yet.
The trick is to add the [Total] member to the result set, instead of adding it to the actual Dimension. Simplified MDX is here:
WITH
MEMBER [Execution Status].[Execution Status].[Total] AS
AGGREGATE([Execution Status].[Execution Status].[Pass].Siblings)
SELECT
{[Measures].[Count]} ON COLUMNS,
{[Execution Status].[Execution Status].Children,
[Execution Status].[Execution Status].[Total] } ON ROWS
FROM [CUBE]
This defines an additional member for Total which aggregates all the Statuses. Then all the Status members as well as the Total are returned. SSRS doesn't care--it still groups by the new set.
I did have some issues with getting the Aggregation to work, which is why I'm using [Pass].Siblings. [Execution Status].Children always returned (null), and [Execution Status].[All] returned 2x the correct answer, presumably because of the [All] member. I could manually enumerate all the statuses as well. Still not sure what the issue there is...