Forum Discussion

hoyty's avatar
hoyty
Regular Visitor
7 years ago
Solved

Stacked Area - count filtered list?

I am new to Power BI so I apologize if this is really simple thing. I did some searching but I may not be asking question properly. I am trying t o build a stacked area graph. It is based on attendance records. My X is attendance date. My areas are three different columns, activity, car pickup and bus. That all works great. My challenge is I would like to have activity twice. Once with a count of one set of filtered items and the other with a different set of filtered items. I can't figure out how to say only count items that equal these 5 values for example. I want to just filter like I would in Excel but I can't figure out where to do it? Thanks for any help.

  • I think I answered my own question. I created a measure and in that I put this command:

    Garderie = COUNTAX(FILTER('Attendance Review',CONTAINSSTRING('Attendance Review'[Activity One],"After") || CONTAINSSTRING('Attendance Review'[Activity One],"Drop")),'Attendance Review'[Activity One])
     
    Then I put that new Field as a value on my chart. This seems to do what I want. If there is a better way to do it please share.

1 Reply

  • hoyty's avatar
    hoyty
    Regular Visitor

    I think I answered my own question. I created a measure and in that I put this command:

    Garderie = COUNTAX(FILTER('Attendance Review',CONTAINSSTRING('Attendance Review'[Activity One],"After") || CONTAINSSTRING('Attendance Review'[Activity One],"Drop")),'Attendance Review'[Activity One])
     
    Then I put that new Field as a value on my chart. This seems to do what I want. If there is a better way to do it please share.