Forum Discussion
Table Visual- How to filter 2 identical columns with 2 separate filters
Hi all, I have a table visual below showing the number of support tickets created by location. The visual is counting by location. I would like to display these Count of Notification Columns with 2 seperate filters. For example, 1 column showing the count of notifications for the last year, and the other showing the count of notifications for the last 30 days.
When I try to apply a relative date filter, it applies to the whole visual and both columns end up filtered.
How would I be able to create 2 filters that are linked to only the appropriate column?
- Anonymous3 years ago
Instead of having your 'Count of Notifications' column in your data you need to create two measures. One which returns the number of tickets in last 30 days, the other will show the last year's count of tickets. Then place them both inside your table.
If you would like help with the dax here's how i'd write them (I don't know your tables/data, so you will have to fill this in. If you'd like me to do it for you then screenshot your data column names and i'll put them in for ya.Tickets in Last 30 Days =
CALCULATE(
COUNTROWS(Tickets),
FILTER(
Tickets,
Tickets[DateReceived] >= TODAY() - 30 && Tickets[DateReceived] <= TODAY()
)
)Tickets in Last Year =
CALCULATE(
COUNTROWS(Tickets),
FILTER(
Tickets,
Tickets[DateReceived] >= TODAY() - 365 && Tickets[DateReceived] <= TODAY()
)
)
4 Replies
- AnonymousNot applicable
Instead of having your 'Count of Notifications' column in your data you need to create two measures. One which returns the number of tickets in last 30 days, the other will show the last year's count of tickets. Then place them both inside your table.
If you would like help with the dax here's how i'd write them (I don't know your tables/data, so you will have to fill this in. If you'd like me to do it for you then screenshot your data column names and i'll put them in for ya.Tickets in Last 30 Days =
CALCULATE(
COUNTROWS(Tickets),
FILTER(
Tickets,
Tickets[DateReceived] >= TODAY() - 30 && Tickets[DateReceived] <= TODAY()
)
)Tickets in Last Year =
CALCULATE(
COUNTROWS(Tickets),
FILTER(
Tickets,
Tickets[DateReceived] >= TODAY() - 365 && Tickets[DateReceived] <= TODAY()
)
)- wiselyman3
Helper II
That worked perfectly, thank you!! I am new with powerbi and this was a light bulb moment for me, haha. I apprecoate the help
- AnonymousNot applicable
No problem! Welcome to the BI community, good luck with your report!
- AnonymousNot applicable
Did this fix the issue? 🙂 If so please mark as solution, would really help me out! If it didn't, we can try again!