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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Emmy66
Helper IV
Helper IV

Multi value selection from slicer

Hi, I'm struggling to wrap my head around this. Any help will be appreciated.

 

I have a report which uses measures that requires user input from from 2 different slicers as shown below. 

Emmy66_1-1716821515431.png

 

 

Below is my dax query which is returning blank. The aim is for me to use the input in the return query against the higlighted columns. i.e. inputs from vYear & vQtr

Payment = 

VAR  vDate = MAX(Calendar[CY Date])

VAR  vYear = YEAR(vDate)-1

VAR vQtr = VALUES(Calendar[quarter])

return

calculate ([Amount],filter(FactTable, FactTable[Year] = vDate && FactTable[Quarter] IN vQtr))

 

 

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Emmy66 ,

Please have a try.

Create a measure.

VAR vDate = MAX(Calendar[CY Date])
VAR vYear = YEAR(vDate) - 1
VAR vQtr = VALUES(Calendar[quarter])

RETURN
CALCULATE(
    [Amount],
    FILTER(
        FactTable,
        FactTable[Year] = vYear && FactTable[Quarter] IN vQtr
    )
)

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

@Anonymous Thanks for your response, which I appreciate a lot. The proposed solution is same with what I tried earlier which didn't work. I've attached a pbix file Multiselect.pbix with the required details and the result of the query too. Any help on this will go a long way. Thanks in advance 

rajendraongole1
Super User
Super User

Hi @Emmy66 - can you try the below dax code and modify as per your tables and columns

Payment =
VAR vYears = VALUES(Calendar[Year])
VAR vQtrs = VALUES(Calendar[Quarter])

RETURN
CALCULATE(
[Amount],
FILTER(
FactTable,
FactTable[Year] IN vYears &&
FactTable[Quarter] IN vQtrs
)
)

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@rajendraongole1 Thanks for your prompt response. I tried it out but it still returned blank. The reason I had the 1st & 2nd variables in my request is to give me the flexibility to create different measures using either 2 years + or 2 years behind i.e. 2022 or 2026.

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Kudoed Authors