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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.