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.
So, in working on a Power BI project for a company, I found an odd issue in attempting to apply a filter which I will detail below.
I am wondering if anyone else has had such issues, if there is a workaround, or if Microsoft is doing anything to resolve the issues.
In attempting to do a lookup, I have created a new Unlinked table with the filter selection values needed, let's call them A, B, C, D, E.
Sections of these filters overlap with each other, Everything in A shows up in all of the rest, Sections of B show up in C, Sections of C show up in D, Sections of D show up in E, so a Regular single slicer/filter will not work for this comparison - and this is the reason the filter selections were made into an unlinked table.
I utilized a measure to get the current selection value
SELECTEDVALUE('Table'[Filter], "A")
So that it was possible to get the selected filter or use the filter that just showed everything if one was not selected. This Measure gave no issues at all and functioned properly.
After that, I created a Boolean value column, let's call it [Filter_Visible] in the table that I wanted to utilize the filer on and used an if comparison to check the filter and if the conditions for the filter were true, All of the associated data has been anonymized and the VALUE# sections are actual checks against the enclosed data--
Filter_Visible = IF([Selected_Filter] = "A", TRUE(),
IF(AND([Selected_Filter] = "B", 'Table_2'[CheckValue] = VALUE1, TRUE(),
IF(AND([Selected_Filter] = "C", AND('Table_2'[CheckValue] >= VALUE2A, 'Table_2'[CheckValue] <= VALUE2B)), TRUE(),
IF(AND([Selected_Filter] = "D", AND('Table_2'[CheckValue] >= VALUE3A, 'Table_2'[CheckValue] <= VALUE3B)), TRUE(),
IF(AND([Selected_Filter] = "E", AND('Table_2'[CheckValue] >= VALUE4A, 'Table_2'[CheckValue] <= VALUE4B)), TRUE(),FALSE()
))))
)
The listed code is where the code breaks and thorws an error --
An unexpected error occured (file 'tmmdmodeltm.cpp', line 2203, function 'MDModelTM::ResolveIMBITableID').
This is where I am trying to figure out what went wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.