cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Joe_100 Regular Visitor
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

PeriodSalesBudgetMonth Year
012018P1101512018
012018P2152012018
022018P1142222018
022018P2141322018
032018P1131532018
032018P2211532018
042018P1111042018
042018P2192042018

 

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
Super User

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] )
    )

View solution in original post

1 REPLY 1
Super User
Super User

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] )
    )

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 57 members 1,067 guests
Please welcome our newest community members: