Forum Discussion
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- 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])
3 Replies
- Bibiano_GeraldoSuper 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])- Charline_74Resolver I
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?- Bibiano_GeraldoSuper User
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 salesMeasure=Var salesPreviousMonth = CALCULATE([Total Sales], PREVIOUSMONTH('Calendar'[Date]))RETURNsalesPreviousMonth
if my reply help you mark it as solution.