cancel
Showing results for
Did you mean:
Regular Visitor

## Slicer selection measure for dynamic calculation

Hi all,

Please see below the following example:

I have a slicer on column period (a month has two periods in this case). If i make a selection on a period i need to see the sales for that specific period only, but i need the budget number over the two periods (month) combined.Somehow i need to filter the budget on a month number based on my first selection.

So in this case i should see the sales: 14    budget: 35

 Period Sales Budget Month Year 012018P1 10 15 1 2018 012018P2 15 20 1 2018 022018P1 14 22 2 2018 022018P2 14 13 2 2018 032018P1 13 15 3 2018 032018P2 21 15 3 2018 042018P1 11 10 4 2018 042018P2 19 20 4 2018

Is it possible to achieve this with a dax formule after i have filtered the dataset based on one period?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III

## Re: Slicer selection measure for dynamic calculation

@Joe_100

May be a MEASURE like this for Budget

```Budget Sum =
VAR myperiod =
SELECTEDVALUE ( Table1[Month ] )
RETURN
CALCULATE (
SUM ( Table1[Budget] ),
Table1[Month ] = myperiod,
ALL ( Table1[Period] )
)
```
Try my new Power BI game Cross the River
Super User III

## Re: Slicer selection measure for dynamic calculation

@Joe_100

May be a MEASURE like this for Budget

```Budget Sum =
VAR myperiod =
SELECTEDVALUE ( Table1[Month ] )
RETURN
CALCULATE (
SUM ( Table1[Budget] ),
Table1[Month ] = myperiod,
ALL ( Table1[Period] )
)
```
Try my new Power BI game Cross the River

Announcements

#### Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!