cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
janwm69 Frequent Visitor
Frequent Visitor

multiple selection in a slicer to calculate value

Hi All,

 

I am building a measure and I am stuck when I select multiple values in a Slicer/Filter. It is working when I have only one selection.

My table consist of 3 columns with fiscal quarter values in them a column with region name and $ value column. I have created a seperate table with all the fiscal years. As I do not want 3 filters in the report, just the one, I am using the seperate table (Years) for the filtering.

 

I have multiple measures that are affected by the same issue, here is an example of one of them:

Booked - Early Renewals = CALCULATE(SUM(Entitlements[PO Value Converted]),FILTER(Entitlements,[Stages]="Booked - Early Renewal"),Entitlements[Revenue Received Qtr]=VALUES(Years[Current Q]))

 

Years[Current Q] is part of the seperate table.

 

Could anybody help me out?

 

Cheers,

 

Jan Willem Moolenaar

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: multiple selection in a slicer to calculate value

@janwm69,

 

You may use it as follows.

IN VALUES ( Years[Current Q] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Community Support Team
Community Support Team

Re: multiple selection in a slicer to calculate value

@janwm69,

 

You may use IN operator instead.

https://www.sqlbi.com/articles/the-in-operator-in-dax/

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
janwm69 Frequent Visitor
Frequent Visitor

Re: multiple selection in a slicer to calculate value

Thanks for the tip.

 

I can get it to work with 2 or more filters, however, this is done in the measure, I would like to do this from a slicer instead.

 

Booked - Early Renewals = CALCULATE(SUM(Entitlements[PO Value Converted]),FILTER(Entitlements,[Stages]="Booked - Early Renewal"),Entitlements[Revenue Received Qtr] IN { "Q1 FY18", "Q2 FY18" })

 

I have tried just putting in the column name but that does not seem to be working.

 

Booked - Early Renewals = CALCULATE(SUM(Entitlements[PO Value Converted]),FILTER(Entitlements,[Stages]="Booked - Early Renewal"),Entitlements[Revenue Received Qtr] IN { 'Years'[Current Q] })

 

Am I overlooking something obvious?

Super User
Super User

Re: multiple selection in a slicer to calculate value

Hi @janwm69,

 

Are you trying to sum till the quarter that you have selected in the slicer.  Share the link from where i can download your file.  ALso, show the expected result.

Highlighted
Community Support Team
Community Support Team

Re: multiple selection in a slicer to calculate value

@janwm69,

 

You may use it as follows.

IN VALUES ( Years[Current Q] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
janwm69 Frequent Visitor
Frequent Visitor

Re: multiple selection in a slicer to calculate value

Thanks you all for your input on this. I had some issues with the DataModel (not loading properly) and some issues with PowerBi itself. After resolving this the solution using IN VALUES solved the issue.