Forum Discussion
dax equivalent to select not In same table with where condition
- Anonymous6 years ago
Anonymous
You need to create a calulated table not a measureGo to modeling tab
click on new table
and paste following formula
Reports = VAR _values = CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),PowerBIAuditLog[Activity]="DeleteReport") RETURN CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),NOT(PowerBIAuditLog[ReportName]) IN _values)
Anonymous Create a calculated table with following syntax and check if it works for you
Table 2 =
VAR _values = CALCULATETABLE(VALUES('Table'[Store]),'Table'[Status]="Close")
RETURN CALCULATETABLE(VALUES('Table'[Store]),NOT('Table'[Store]) IN _values)
Hi Vimal,
I am getting this error
" A table of multiple values was supplied where a single value was expected."
This my actual dax query:
- Anonymous6 years agoNot applicableIn not operator you need to pass report name not activity
Reports =
VAR _values = CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),PowerBIAuditLog[Activity]="DeletedReport")RETURN CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),NOT(PowerBIAuditLog[ReportName]) IN _values)- Anonymous6 years agoNot applicable
Hi Vimal,
I am getting same error after changing the formula to Reportname.
Here is the Sample data for the reference
ReportName Activity CreateDate Backorder Dashboard CreateReport 2/09/2019 0:00 Backorder Dashboard CreateReport 12/09/2019 0:00 Backorder Dashboard CreateReport 7/11/2019 0:00 Backorder Dashboard DeleteReport 3/09/2019 0:00 BCP Standard Pricing CreateReport 7/08/2019 0:00 BCP Standard Pricing DeleteReport 7/08/2019 0:00 DAX Formula:
Reports =
VAR _values = CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),PowerBIAuditLog[Activity]="DeletedReport")RETURNCALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),NOT(PowerBIAuditLog[ReportName]) IN _values)- Anonymous6 years agoNot applicable
Anonymous I'm able to create table with the sample data you have provided and as per your logic I'm getting zero record
One more thing in sample data in activity column your value is DeleteReport whereas in your formula you have written DeletedReport. Is it possible to share pbix after masking sensitive data?
.