DAX: I need CALCULATE not to be affected by database filtering

0

I have the following calculation in a database:

SUM:=CALCULATE(SUM([Data]),FILTER(ALL(Table[Month]),[Month]=[CURRENTMONTH]))

Where [Data] is numeric, [Month] it's date (it's 12 months of the year), [CURRENTMONTH] is a calculation that according to today's date identifies the current month

In that same table I have a column with the days of the month [day]

I need to know that the calculation is not affected by the filters in the database, that is to say that I need the sum to be the total of the month even if I filter for a single day of the month.

Any ideas?

    
asked by Luis Rafael Gonzalez de la Cer 23.02.2018 в 19:41
source

1 answer

0

You can use the ALLEXCEPT function that " removes all context filters in the table, except for filters that apply to the specified columns ".

would be the formula:

SUM:=CALCULATE(SUM([Data]),ALLEXCEPT(Table[Month],[Month]=[CURRENTMONTH]))

    
answered by 24.02.2018 в 02:04