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.
Greetings,
I want to be able to filter on a measure value in my table visual but no tutorials are working. I have a Power BI report that has eight measures that will return a string with an error reason with the data such as "Duplicate Entry" or the "Item does not exist in the master data". I then have a measure called Errors that becomes a column on a table that for each row shows the type of error in the data.
Example:
Order ID | Product No. | Amount | Errors |
1 | 1 | £2 | Item does not exist in the master data |
2 | 2 | £3 | Item does not exist in the master data |
3 | 3 | £4 | Item does not exist in the master data |
4 | 4 | £5 | Duplicate |
5 | 4 | £5 | Duplicate |
I've followed the following tutorials:
https://www.youtube.com/watch?v=AZAL-QPn5Zc
https://www.youtube.com/watch?v=xO9Caya9Qxw
https://www.youtube.com/watch?v=AHiCE1N0XHE
None of them works, when I place the below filter measure in the table it filters only the column but not the whole table, when I remove the filter measure column from the table and apply has no effect when I apply changes to the slicer.
This is my DAX:
Filter Status =
VAR _filterValue = SELECTEDVALUE(Errors[Error])
VAR _errorValue = 'Invoice'[Errors]
VAR _result =
SWITCH(
TRUE(),
_errorValue = _filterValue, _errorValue,
ISBLANK( _filterValue ), _errorValue,
BLANK()
)
RETURN
_result
What am I missing with this? The best results I got was from https://www.youtube.com/watch?v=8Nt6sHJE_RE
Solved! Go to Solution.
Hi @
“when I place the below filter measure in the table it filters only the column but not the whole table”
I understand what you said not very clearly, but I think this maybe the other measure, you used in this measure, doesn't use all(table) to remove the filter, so the result will be affected by current filter.
Or you can change the number to mark the statue avoid make some mistakes in the filter.
Filter Status =
VAR _filterValue =
SELECTEDVALUE( 'Error'[Errors] )
VAR _errorValue = 'Invoice'[Errors]
VAR _result =
SWITCH(
TRUE(),
_errorValue = _filterValue, 1,
ISBLANK( _filterValue ), 2,
3
)
RETURN
_result
When you filter the statue ,you can just use is like the following show:
If I understood you , please provide your pbix without sensitive information information and the expect result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @
“when I place the below filter measure in the table it filters only the column but not the whole table”
I understand what you said not very clearly, but I think this maybe the other measure, you used in this measure, doesn't use all(table) to remove the filter, so the result will be affected by current filter.
Or you can change the number to mark the statue avoid make some mistakes in the filter.
Filter Status =
VAR _filterValue =
SELECTEDVALUE( 'Error'[Errors] )
VAR _errorValue = 'Invoice'[Errors]
VAR _result =
SWITCH(
TRUE(),
_errorValue = _filterValue, 1,
ISBLANK( _filterValue ), 2,
3
)
RETURN
_result
When you filter the statue ,you can just use is like the following show:
If I understood you , please provide your pbix without sensitive information information and the expect result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks _chenwu zhu,
Legend! It works now, cheers 🙏
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |