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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Charline_74
Resolver I
Resolver I

Mesure with SELECTED VALUE

Hi

I have 2 questions :

Is it possible to create a measure that doesn't take into account the selection of a value in a slicer?

 

And I'd like help creating a measure that calculates the sum of my sales based on a date selected in a slicer.

 

Thanks in Advance 

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

1- Yes, its possible using "ALL" dax Function, follow the link to see the documentation: ALL function (DAX) - DAX | Microsoft Learn
2- Just create the measure where you'are calculating the SUM of you sales, if the date calendar and your sales are in the same table, when you put that column of date in a slicer the filter's will be calculated automatically. if are in diferent tables will work also, but you need to relate these tables.
Example
Measure = SUM([Your_Column_Of_sales])

View solution in original post

3 REPLIES 3
Bibiano_Geraldo
Super User
Super User

1- Yes, its possible using "ALL" dax Function, follow the link to see the documentation: ALL function (DAX) - DAX | Microsoft Learn
2- Just create the measure where you'are calculating the SUM of you sales, if the date calendar and your sales are in the same table, when you put that column of date in a slicer the filter's will be calculated automatically. if are in diferent tables will work also, but you need to relate these tables.
Example
Measure = SUM([Your_Column_Of_sales])

Thanks for your reply
For point 2:
Is it possible, for example, to calculate the sum of my sales according to the month preceding the date selected in my slicer?
If so, can you give me an example?

Yes, it is possible, you can use the following code:
Note: Make sure to replace 'Calendar'[Date], with your column date, and [Total Sales] with your SUM of sales

Measure=
Var salesPreviousMonth = CALCULATE([Total Sales], PREVIOUSMONTH('Calendar'[Date]))
RETURN  
salesPreviousMonth

if my reply help you mark it as solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.