Forum Discussion
DAX Filter not in date
- 9 years ago
Hi nooneliveforeva,
Would you like to try this formula in a New Table.
Result = FILTER ( 'SourceTable', 'SourceTable'[Year] = 2017 && ( NOT 'SourceTable'[City] IN CALCULATETABLE ( VALUES ( SourceTable[City] ), FILTER ( 'SourceTable', 'SourceTable'[Year] = 2016 ) ) ) )Best Regards!
Dale
Hi nooneliveforeva,
I dont have a direct solution to it, but a workaround.
Steps:
1. Create on temp table using SUMMARIZE
temp = SUMMARIZE(Issue,Issue[location],"countofyear",DISTINCTCOUNT(Issue[year]))
Step1
2. Create a custom column in main table
countofyear = LOOKUPVALUE(temp[countofyear],temp[location],Issue[location])
Step2
3. Now Create the required table using the custom column
Solution = CALCULATETABLE(Issue,FILTER(Issue,AND(Issue[year]="2017",Issue[countofyear]=1)))
Step3
This will give you the desire results
-Sumit
- nooneliveforeva9 years agoFrequent Visitor
Hi sumit4732,
Doesn't work, step 1 give me :
L'expression fait référence à plusieurs colonnes. Plusieurs colonnes ne peuvent pas être converties en une valeur scalaire.
- sumit47329 years agoAdvocate II
Hi nooneliveforeva,
It looks like you are trying to create a measure, step 1 is for creating a New Table : click on Modeling tab, and than New table
Please let me know if you face any issue with this, also please share shreentshot that will help.
-Sumit
- nooneliveforeva9 years agoFrequent Visitor
Hi sumit4732,
Done that, but this create a "Solution" table with many column,
when i drag a location column to the dashboard, it doesn't contain any data :(