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
Joe_100
Helper I
Helper I

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
Zubair_Muhammad
Community Champion
Community Champion

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

Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

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

Regards
Zubair

Please try my custom visuals

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.