0
$\begingroup$

In powerBi, a column is created with below formula, and it is working good.

activedays = COUNTAX(RELATEDTABLE(ActivesInactiveData),ActivesInactiveData[Surface Date])

However, I want to add a filter some thing like

ActivesInactiveData[Topic]<> null

Could you please advice on how to do so, most of the examples on web are using on relatedtable etc - where relation is already build, could you please advice/direct to me what I could find an example of adding filter to relatedtable or filter data from a unrelated table based on field like ID column etc.

Here there is a relation user ID in current table has more than 1 rows in ActivesInactiveData table.

$\endgroup$
0
$\begingroup$

I would wrap your expression in a CALCULATE function, so something like:

activedays = CALCULATE ( 
    COUNTAX ( RELATEDTABLE ( ActivesInactiveData ) , ActivesInactiveData[Surface Date] ) 
    , ISBLANK ( ActivesInactiveData[Topic] ) = FALSE )

I assumed [Topic] is text, so NULL will converted by DAX to BLANK().

$\endgroup$
1
  • $\begingroup$ Do have access for the movement - will check once I get the access 2-3 days. Thank you for the help. $\endgroup$
    – surpavan
    Sep 17 '16 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.