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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
janwm69
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

@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.

View solution in original post

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@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.

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?

@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.

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.

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.