filters based on context
2 Topicscreate dax measure to remove context filter
hi everyone im trying to create a measure that remove the conext filter in a table visual with if statement condition i was trying to use 'all' function to remove the filter from the column but still not working. current measure : calculate(sum('categories trans'[achievement]), all('categories trans'[Base_type]) in the above example , i want to ignore the filter by (base_type) column in one category (zeed) and keep it for the other categories. for example: if category= 'zeed' i want the achievement measure to return 441 and for other categories i want the achievment measure to return same values above.1.2KViews0likes2CommentsWrong Column Totals (Matrix)
I wrote a DAX measure that convert a YTD balance to a common currency (EUR). The measure works well when a single company is selected (1 currency) but generates a wrong Total column when I try to select 2 or more companies (currencies). Act_Eur_Ytd = VAR NUMERATOR = [Act_Lc_Ytd] VAR DENUMERATOR = CALCULATE(AVERAGE('Facts'[Avg_Ytd_Fx_Rate]), ENDOFMONTH('Calendar_Table'[Date].[Date])) RETURN ROUND(DIVIDE(NUMERATOR,DENUMERATOR),2) Example: The expected output of the matrix is: The current behavior of measure Act_Eur_Ytd is: When Company 1 alone is selected, Numerator properly sums EUR amounts and divides them by 1 When Company 2 alone is selected, Numerator properly sums CNY amounts and divides them by 0.1 When both companies are selected, Numerator sums EUR + CNY (wrong) and divides by an average (wrong). The exchange rate is linked to calendar, in order to convert at the latest average rate of the selected Month/Year. In order to give a better context, I attach the real life example, with source data. DOWNLOAD: Example (pbix) and Source Data (xlsx) I appreciate the help of the community to properly correct the syntax of my DAX measure. Thank you. MarcoSolved902Views0likes2Comments