Forum Discussion
Bookmark with slicers
- 8 years ago
Solved issue by applying bookmark to selected visuals, excluding date filter.
Regards,
Yerkhan
Hi ysapiyev,
I have a dahsboard, that need to have last month always showing however I compare with AOP and Forecast that goes all the way until december, and getting the current month value for actuals based on slicer was always giving me 0 because there were no actuals on the maximum date (december)
I use a change on my actuals measures to look something like this:
Current Year =
VAR Selected_Min_Date =
MIN ( Dim_date[Date] )
// Select Mininum date of calendar to get year
VAR Select_Max_Month =
MAX ( Dim_Date[Month] )
// Select Maximum date to check if it's until december
RETURN
IF([Actuals] = 0; BLANK();IF (
DISTINCTCOUNT ( Dim_Date[Month] ) = 12;
CALCULATE (
[Actuals];
Dim_Date[Date]
= DATE ( YEAR ( Selected_Min_Date ); IF(MONTH ( TODAY () ) = 1 ; 12 ; MONTH(TODAY()) - 1) ; 1 )
// choose the month before current month
);
CALCULATE ( [Actuals] ; Dim_Date[Month] = Select_Max_Month)
)) //otherwise give current monthnMaybe you can use something similar to adjust your values to get the last 3 months.
Regards,
MFelix
Thanks for your answer.
However, I can't use your solution, since I use live onnection to SSAS.
Regards,
Yerkhan
- MFelix8 years ago
Super User
- MFelix8 years ago
Super User
Hi ysapiyev,
Yes it's possible to have the creation of measures in live connection check this link:
https://docs.microsoft.com/en-us/power-bi/desktop-analysis-services-tabular-data
If you go to the FAQ you have this question:
Question: If I created a live connection, can I edit the model or query in Power BI Desktop?
Answer: You can create report level measures in the Power BI Desktop, but all other query and modeling features are disabled when exploring live data.
You can have measures created but not making changes to your model.
On previous versions of PBI you had to go to the path below to activate the measures believe this is already active on the current version of PBI.
- File
- Options & Settings
- Options
- DirectQuery
- Check the: Allow unrestricted measures in DirectQuery mode
Regards,
MFelix