Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello guys,
I have been struggling to understand how the measures and the card visuals do not work as expected.
The columns involved are : (1) TICKETID, (2) REPORTDATE,(3) OWNERGROUP from a table called 'MAXIMO_SR' (As shown in picture below)
And I have created a date slicer with MAXIMO_SR[REPORTDATE] to filter the date, a slicer with MAXIMO_SR[OWNERGROUP] to filter the group , and of course a measure called [Total Count] to count the number - COUNTROWS(MAXIMO_SR) to put on card visual, which I expect to change as I toggle either/both slicers, and it does.
Everything looks fine until I go on to write another measure to put on a card visual to show the counts of all the events irregardless of what ownergroup the event falls into, while subjected to date slicer I created earlier , so I wrote a measure :
I expect the 'Total Selected Service Requests' card visual WOULD change as I toddle the date slicer, and WOULD NOT as I do the OWNERGROUP slicer, and it kinda backfired - it turned to be no difference from the [Total Count]:
But when I wrote another measure ,as shown below, to put on card visual. It works, it would not change when I toggle the REPORTDATE slicer but would as I do the OWNGROUP slicer
Solved! Go to Solution.
A lot of your issues are being caused by having a single table. If you create a separate date table https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/ and a table with unique OWNERGROUP (you can just use DISTINCT(ColumnName) to
create such a table you will find using REMOVEFILTERS much more predictable.
That said in your current setup are you currently sorting OWNERGROUP by another column? If you are then you need to remove that as well using REMOVEFILTERS (both get added to filter context)
A lot of your issues are being caused by having a single table. If you create a separate date table https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/ and a table with unique OWNERGROUP (you can just use DISTINCT(ColumnName) to
create such a table you will find using REMOVEFILTERS much more predictable.
That said in your current setup are you currently sorting OWNERGROUP by another column? If you are then you need to remove that as well using REMOVEFILTERS (both get added to filter context)
Hi @_lasfera ,
As @lbendlin said, you can try using the REMOVEFILTERS function, which clears the filters in a given table or column.
You can refer to the following blogs to deepen your understanding of these functions.
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi! Thanks for your reply and sorry for the late response, this doesn't seem to work as well.
Here's how I write the codes:
ALLEXCEPT is a very blunt instrument. You may want to consider REMOVEFILTERS instead.
Thanks for your reply, but that didn't seem to work as well, I detailed that in the reply above.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |