Download the values during the night load if the data does not change during the day. This will make the search much faster. If necessary, I am a big fan of pivot tables. In your case, they are necessary!
, , , , SQL Server, Analysis Services. , , , , , , . 10 , , SSAS.