'How to use the result of a measure in the filter of a DAX query?

I have a measure in my power bi dataset called Nett Wipp. I need to write a query that gets some data from my dataset and filters where Nett Wip is not 0.

In plain English my query should be: get me Invoice Recov % where Nett Wip is not 0 (Invoice Recov % is a column in a table)

Using Dax Studio Query Builder, the below query is generated:

EVALUATE
CALCULATETABLE(
    ROW(
    "Invoice Recov %", [Invoice Recov %]
    ),
    KEEPFILTERS( FILTER( ALL( [Nett WIP] ), [Nett WIP] <> 0 ))
)

However, this query does not work as a result of the measure being used in the filter. I understand that the measure is a calculation, and that is why it is not working, but how can I write this query then? In MsSql I would consider using a having clause, is there something similar to a having clause in DAX?

Please forgive my naivety as I am very new to Dax. Any help would be greatly appreciated.



Solution 1:[1]

You can try :

FILTER(
    [Invoice Recov %], 
    [Nett WIP] <> 0 
)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 HubertL