Forum Discussion
How to Select a default view based on a particular filter on-load of a report?
Hi All,
I need to implement the following scenario: I have several views (fact tables) based on which I have several visuals created in Power BI. All these facts are joined with a Date dimension table (using manage relationship feature). The date dimension contains Year, month, day and other fields.
The facts contain data from January 2015 to current date, i.e. June 2016. I also have a Year slicer (populated using the date dimension) in the report showing the years (2015 & 2016). As per the requirement, when the User opens the Power BI report, he should only see the data for last 12 months (i.e. July 2015 to June 2016 - 12 bars along X axis). Now, if he clicks the 2015 button in the Year slicer he should be able to view the data from Jan 2015 to Dec 2015 and if he clicks 2016, he should view data from Jan 2016 - June 2016. If he unselects the slicer button, the visuals should again revert back to the default view i.e. last 12 months (i.e. July 2015 to June 2016).
I am not able to implement this using the current features. Any kind of help/pointers will be really helpful and highly appreciated. Thanks in advance.
Regards,
Koushik.
2 Replies
- Greg_Deckler
Community Champion
One way, you could potentially use an IF statement in conjunction with HASONEFILTER option in your measures/custom columns. If it has one filter, then do your calculation one way and if it does not, do it the default way.
- Tanja1234New Member
Hi Greg,
I have the same problem...as I am very new in this topic could you please help me with an example of how your solution could look like? Thanks in advance!