Forum Discussion
Anonymous
4 years agoNot applicable
How to Filter data and get record in DAX
I want to filter Worker table in DAX and get data like
Select * from Worker w
where w.Name <> "Once Off"
- Anonymous4 years agoIssue resolved.CALCULATE(SUM(InvoiceLines[Tons]),FILTER(InvoiceLines, InvoiceLines[ITEMID] = InventoryStock[ITEMID]),Filter(Worker, Worker[WORKERNAME] <> "Once Off"))
6 Replies
- smpa01
Community Champion
Anonymous equivalent DAX query would be
//in SSAS EVALUATE FILTER(Worker, Worker[Name]<>"Once Off") //in PBI Table = FILTER(Worker, Worker[Name]<>"Once Off")- AnonymousNot applicable
No any trick to filter data in new column/new measure?
- smpa01
Community Champion
Yes there is. Anonymous but how does your data look like? Provide a sample and what is the end goal?
- v-yalanwu-msft
Community Support
Hi, Anonymous ;
If you only want to filter columns in visual or data view, you can directly filter like below:
If you want to use dax, you could create a measure.
flag = IF(MAX('Table'[Name])="Once Off",0,1)then apply it into filter.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicableIssue resolved.CALCULATE(SUM(InvoiceLines[Tons]),FILTER(InvoiceLines, InvoiceLines[ITEMID] = InventoryStock[ITEMID]),Filter(Worker, Worker[WORKERNAME] <> "Once Off"))