Forum Discussion

hangbtt2's avatar
hangbtt2
Frequent Visitor
2 years ago
Solved

Exclude user with condition from the chart

Hi everyone, I have a problem that I hope you can help me with. I have user data tracked by events. I want the chart to filter out users who have at least one event_type=1 within a specified time pe...
  • MattAllington's avatar
    2 years ago

    It looks to me like you are using Date from the fact table in your formula and your visual (possibly the slicer, too). This is not the correct way to do it.

    I missed the original point you made about the "selected period". You will need something like this (after you fix the calendar issues). I assume what you want is for the slicer to select the period and for the formula to remove anyone with the event =1 for the slicer period, not the monthly periods in the column chart. If that's not what you want, then this formula will need to change

    = CALCULATE (
    COUNTROWS ( fact_event ),
    FILTER ( User, CALCULATE ( MIN ( factevent[eventtype] ) > 1 ) ),

    ALLSELECTED(Date)
    )

     

    it may be that you need this, but I can't be sure. You would have to test both. 

    = CALCULATE(CALCULATE (
    COUNTROWS ( fact_event ),
    FILTER ( User, CALCULATE ( MIN ( factevent[eventtype] ) > 1 ) ))

    ALLSELECTED(Date)
    )

     

    also, do yourself a favour and get rid of the chart until it's working. Set up a matrix and add the same columns (month, event type).  It is much easier to debug the problems if you can see the numbers. 

    after these changes, if you still can't sort it, post the workbook again and I will take a look.  I will be at my desk in about 1 hour