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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Super User
Super User

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
Super User
Super User

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

HotChilli
Super User
Super User

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.