Forum Discussion
Anonymous
6 years agoNot applicable
dax equivalent to select not In same table with where condition
Hi All, I have table that has log that has records for same stores which are open,closed. I want to select stores which are not closed I am looking for Dax equivalent for following query SQL: s...
- 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
6 years agoNot applicable
In not operator you need to pass report name not activity
Reports =
VAR _values = CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),PowerBIAuditLog[Activity]="DeletedReport")
Reports =
VAR _values = CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),PowerBIAuditLog[Activity]="DeletedReport")
RETURN CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),NOT(PowerBIAuditLog[ReportName]) IN _values)
Anonymous
6 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")
RETURN
CALCULATETABLE(VALUES(PowerBIAuditLog[ReportName]),NOT(PowerBIAuditLog[ReportName]) IN _values)