Forum Discussion
Anonymous
5 years agoNot applicable
slicer
hiii i am tring to filter my data based on slicer i have a slicer with months if i click on a moth the data in line graph changes and didplay past 2 mnths and present month data which i wanted. no...
- 5 years ago
Hi Anonymous ,
Sorry for the late reply!
Modify your measures for M.SLA%1 and RAW_SLA%1 as below:
M.SLA% 1 = IF(MONTH(MAX('Query1'[Call Closed])) <= SELECTEDVALUE('Table'[Month]) && MONTH(MAX('Query1'[Call Closed])) >=SELECTEDVALUE('Table'[Month])-2, CALCULATE ( [M.SLA%], FILTER ( ALL(Query1), MONTH('Query1'[Call Closed]) <= SELECTEDVALUE('Table'[Month]) && MONTH('Query1'[Call Closed]) >=SELECTEDVALUE('Table'[Month])-2 && Query1[Call Closed].[Year] = YEAR ( TODAY () ) ) ),BLANK() )RAW_SLA% 1 = IF(MONTH(MAX('Query1'[Call Closed])) <= SELECTEDVALUE('Table'[Month]) && MONTH(MAX('Query1'[Call Closed])) >=SELECTEDVALUE('Table'[Month])-2, CALCULATE ( [RAW SLA%], FILTER ( ALL(Query1), MONTH('Query1'[Call Closed]) <= SELECTEDVALUE('Table'[Month]) && MONTH('Query1'[Call Closed]) >=SELECTEDVALUE('Table'[Month])-2 && Query1[Call Closed].[Year] = YEAR ( TODAY () ) ) ),BLANK())And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
MFelix
5 years agoSuper User
Hi Anonymous ,
You are using disconected tables and because of that the information is not updating accordingly what you need to do is the same thing as you did for the line chart however instead of having the filter the information for between the 3 months you need to put it for a single month picking on the RAW SLA% your measure should be similar to:
RAW_SLA% Month =
CALCULATE (
[RAW SLA%];
FILTER (
Query1;
Query1[Call Closed].[MonthNo] = [Selected Slicer]
)
)
One other option is to create a relation ship between the tables and everything will work properly, you will need to redo your measure for the last 2 months.