Dynamic Selection of Slicer for Character Values - dynamic

So, I have a Power BI report where I have a slicer with values such as :
202005
202004
202003
202002
202001
Pacing
Every month, the data gets added and the category is incremented by 1. i.e in June, I'll have 202006 as well.
I have a report where I want the data to be filtered by last 3 months and Pacing.
i.e in May, default selection should be 202004, 202003, 202002, Pacing
in June, default selection should be 202005,202004,202003, Pacing
In other words, I want default selection of: max month-1, max month -2, max month -3 and pacing.
Currently, I am manually making the selection and saving the report and then publishing it again. But to do so, I have to refresh data every time to get updated values of the month and it has increased my file size to a great extent because the data is imported in my report. I believe that my report can crash anytime if I continue this.

While you can't yet directly set slicer defaults, there are some workarounds.
However, relative date filtering or Top N filtering on a slicer might help:
If you don't need all the old data, you can keep your file size from continuing to grow by filtering the dates in the query editor before they are loaded to the model.

Related

Automating excel to teradata table and number of rows and columns increasing in Excel

I need to automate a excel table for Time value for Money Calculation to teradata table.
Table structure is like this - it has these columns:
Month Base_Rate 202201 202202 202203 202204.......
and so on
I have attached image of sample data.
Same month is in row and column and I cannot change the structure of data in Excel.
What would be the best way to automate table creation and updating the records each month?
By automate I mean to create reusable script, that can be used every month to update data in table.
There is no definite period when the column gets added, roughly it is done nearly once a year which mean one whole year is added in columns at a time and then the same next year and so on.
And rows are added almost every month which mean for eg. Nov month details are added in Nov
I thought of truncate and load every single month, but this isn't the best option.

SSAS Date stored as text

I have a measure table for forecast that has a MMM-YY date stored as text;
Period Forecast
-------------------
Jan-20 200
Feb-20 300
I also have some other tables in my model that have similar date formats ie. (1/2020) or 2020_1. Hence I created a date dimension that maps the period to an actual datetime and linked it to the fact table;
Period (Month/Year) Year_Month MonthEnd
---------------------------------------------------
Jan-20 (1/2020) 2020_1 31/01/2020
Feb-20 (2/2020) 2020_2 28/02/2020
This is causing me two issues;
If I slice the forecast by period I get the right answer, but if I slice by the datetime field 'MonthEnd', SSAS can't allocate the costs across the attributes and I get the total each month (so 500 in both jan and feb in this example). Why?
I can't connect time as a referenced dimension to the date dimension so I can't use any time intelligence features.
I could just swap the period ID for a datetime on ETL to standardise the date fields across the model, but I wondered if there was a standard way to approach this?
https://imgur.com/gallery/onxtvhq
In Analysis Services Multidimensional models you need to standardize on one format for representing a period and have all measure groups use that. I would recommend you change the SQL Query for your Actuals measure group to return values that join to the Period column in your Date table.
Understanding how this works means understanding attribute relationships and the IgnoreUnrelatedDimensions setting. If set to true then slicing by an “unrelated” attribute (one that’s below the grain or unrelated or an unrelated dimension) will just cause the measure to repeat. If set to false then it will become null.
I’m unclear why you need Time as a reference dimension. It appears to also contain a Date hierarchy. Typically Date is for days, weeks, months and years. Typically Time is for hours minutes and seconds. For processing performance reasons I would avoid reference dimensions. They are more trouble than they are worth. Add the Time dimension key to your fact tables.
The scrrenshot shows there is relation between Date and Forcast,so I do not think the root cause that is the root casue,however, you can try GreGalloway's solution, to set the property of IgnoreUnrelatedDimensions to False to test.
enter image description here

Tableau combining rows with the same info

I have a dashboard in Tableau which shows different payments received - the amount, the date the payment was received, and a calculated field which shows the number days since the payment was received.
However, a lot of payments are the same, with the same amount, and received on the same day; so Tableau collapses these together, and adds the total days since the payments were received together in the final column, i.e. five lots of £5.50, each received on 1st January shows as below (as of 01/02/2018)
Column 1 Column 2 Column 3
£5.50 01/01/2018 155
But I need separate rows for each. Does anyone know how to stop tableau doing this, or of a workaround?
Many thanks.
You could try using RANK_UNIQUE function.
First of all, in the Analysis Menu, uncheck Aggregate Measures.
Then, starting from this data:
You can get this result:
Additionally, you may want to hide Rank from rows just not-showing header.
Is this something close to what you're looking for?
EDIT/UPDATE
In order to get all values and not just for the top rows, just move the Rank at the very beginning of the shelf:

SSRS date drill through issue

I have a matrix report called Store Sales which is made up of:
STORES in the row group
DATES in the column group
Sum of SALES in the values group
The DATES column is formatted using the following expression:
=format(Fields!DATES.Value, "MMM yyyy").
The matrix report also has 2 parameters #Start and #End. This all works great but I then added a linked report (Sales Store Details) so that the user can click on the SALES value for any purchase by month and store. The linked child report (Sales Store Details) uses the #Start and #End parameters from the original report (plus an additional #Store parameter) but this is where I run into problems. Rather than bringing me the purchase details for a particular store and month it brings me back everything from the time period selected from the original date parameters. So say I originally selected 2015-01-01 to 2015-06-30 with the #Start and #End parameters from the Store Sales report. When I then select on my FEB 15 value in my matrix report the drill down linked report doesnt just give me Feb 15 data but all the other months data too ie Jan-Jun 15. I understand that the original report parameters specified the Jan-Jun 15 date period but surely when I select on the Feb value in the matrix report that's what my linked report should drill down too right?
Any help would be really appreciated.
It sounds like you're passing the original #Start and #End parameters from the parent report. If so then you're passing the original date filtering parameters so it shouldn't be surprising that the date filtering on the child report is the same.
If you want to limit the child report's date filtering to only the month of the row being clicked you'll need to pass through the date value for that row instead of the original parameters. I'm not sure how your data set is structured but I assume there is some date column you use to determine the appropriate filtering to use.

Use slicers value into DAx for Dynamic filtering

I want to link my Slicers values with DAX expression. What I want is If I select any month & Year from Month & Year Slicer
e.g (March Month & 2013 Year) then it should show table as:
March - May2011 | March-May2012 | March-May2013
Sum Of Games 200 | 300 | 400
Sum Of Assets 150 | 400 | 600
Basically it should calculate values from selected month to (Selected month +3) & selected year to (Selected Year - 3).
So is it possible using Slicer selection dynamically?
I have done this in static way. For reference you can see this link
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/73735550-2a8c-4270-b09c-70c98aec5eb8/grouping-based-on-month-range?forum=sqlkjpowerpivotforexcel
but I want it based on user selection dynamically.
Thanks in Advance!
Rameshwar,
without knowing your table structure, it's a bit difficult to propose "the right" solution.
However, to keep things simple (and speedy), I suggest using OLAP Pivot Table Extension. It allows you to grab selected values on slicer and put them into a regular cell.
This way, you could add just year as columns header, and list the months above them. See this article for more details, it describes a similar scenario:
I am not a big fan of cascaded IFs and using complex SWITCH expressions. They are fine when dealing with small amount of data, but could lead to many difficulties and I would suggest avoiding them whenever possible.
Hope this helps :)