Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply

Filter using slicer

I'm tyring to filter table using year value from slicer , 
Report =
var Selected_Value = SELECTEDVALUE('Year'[Year])
return UNION(
ROW("Quarters","Last Quater","Number",CALCULATE(COUNT(HRSSNew[ID]),FILTER(HRSSNew,HRSSNew[Year] = IF(ISBLANK(Selected_Value),YEAR(TODAY()),Selected_Value) -1 && HRSSNew[QuarterNo] = 4 && HRSSNew[ProcessType] = "Reports"))),
ROW("Quarters","Quater 1","Number",CALCULATE(COUNT(HRSSNew[ID]),FILTER(HRSSNew,HRSSNew[Year]= IF(ISBLANK(Selected_Value),YEAR(TODAY()),Selected_Value) && HRSSNew[QuarterNo] = 1 && HRSSNew[ProcessType] = "Reports"))),

ROW("Quarters","Quater 2","Number",CALCULATE(COUNT(HRSSNew[ID]),FILTER(HRSSNew,HRSSNew[Year]= IF(ISBLANK(Selected_Value),YEAR(TODAY()),Selected_Value) && HRSSNew[QuarterNo] = 2 &&HRSSNew[ProcessType] = "Reports"))),

ROW("Quarters","Quater 3","Number",CALCULATE(COUNT(HRSSNew[ID]),FILTER(HRSSNew,HRSSNew[Year] = IF(ISBLANK(Selected_Value),YEAR(TODAY()),Selected_Value) && HRSSNew[QuarterNo] = 3 && HRSSNew[ProcessType] = "Reports"))),

ROW("Quarters","Quater 4","Number",CALCULATE(COUNT(HRSSNew[ID]),FILTER(HRSSNew,HRSSNew[Year] = IF(ISBLANK(Selected_Value),YEAR(TODAY()),Selected_Value) && HRSSNew[QuarterNo] = 4 && HRSSNew[ProcessType] = "Reports"))
)) 

It's not recognising year slicer value , so default Year=2024 is coming.

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

If you want something to respond to a slicer, yes, it has to involve a measure or a visual.

View solution in original post

3 REPLIES 3
HotChilli
Community Champion
Community Champion

If you want something to respond to a slicer, yes, it has to involve a measure or a visual.

HotChilli
Community Champion
Community Champion

Report is a table?  Calculated tables and columns do not know about slicers.  Slicers affect visuals and measures.

Yes ,Report is table , so in this scenario I have to create a measure just to calculate value ?

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.