Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a year slicer for controling matrix 1, and start year and end year slicer for controlling matrix 2 which is used to calculate the difference of the selected year. My question is how can I use the start year and end year slicer to control the matrix 1 instead of using the year slicer or vice versa?
Below is the measure of matrix 2 or start/end year:
Solved! Go to Solution.
@henry24007 , I have discussed it in this video
Select data between months - https://youtu.be/nEt7dT3Tfv4
Date Range Using 2 slicer =
var _max = minx(allselected(Date1), Date1[year])
var _min = maxx(allselected(Date2), Date2[year])
return
calculate(countrows(Table), Filter(Table,year(Table[Date]) <=_max && Year(Table[Year]) >=_min) )
or
Date diff =
var _max = minx(allselected(Date1), Date1[year])
var _min = maxx(allselected(Date2), Date2[year])
return
calculate(countrows(Table), Filter(Table,year(Table[Date]) =_max))- calculate(countrows(Table), Filter(Table, Year(Table[Year]) >=_min) )
For second code
How to use two Date/Period slicers
@henry24007 , I have discussed it in this video
Select data between months - https://youtu.be/nEt7dT3Tfv4
Date Range Using 2 slicer =
var _max = minx(allselected(Date1), Date1[year])
var _min = maxx(allselected(Date2), Date2[year])
return
calculate(countrows(Table), Filter(Table,year(Table[Date]) <=_max && Year(Table[Year]) >=_min) )
or
Date diff =
var _max = minx(allselected(Date1), Date1[year])
var _min = maxx(allselected(Date2), Date2[year])
return
calculate(countrows(Table), Filter(Table,year(Table[Date]) =_max))- calculate(countrows(Table), Filter(Table, Year(Table[Year]) >=_min) )
For second code
How to use two Date/Period slicers
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |