Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

Calculated column remains blank due to unrelated tables?

$
0
0

Dear all,

 

I am currently trying to create a solution where I can dynamically fill one and the same matrix, based on several columns with criteria. All my columns (which all have a (text) value simular to either "check" or "not relevant") are in the same table. However, I wanted to create just one slicer, which shows all the desired filter options.

 

Everything goes well, except that in the final step, my calculated column remains blank, while I want to have it filled with either True of False. I have read different posts on different (but related) solutions and from what I gather and understand, it should be possible to do what I am trying to do. Am I wrong? What am I missing?

 

In order to do this, I have created a second table, which consists of just one (text) column, filled with just the unique criteria I need in my slicer. This table however is completely unrelated to my first table.

 

See for an example of the tables below:

example of table structure. Multiple fields with criteria and a separate table with all criteria.example of table structure. Multiple fields with criteria and a separate table with all criteria.

The actual tables look like this:

Table with criteriaTable with criteriaTable with Criterium 1 (also 2, 3, etc)Table with Criterium 1 (also 2, 3, etc)Note that there is no relation between the tables.Note that there is no relation between the tables.

 

Next, I created my slicer and filled it with the values from the table with the source criteria:

Example of the report with slicer. Also note the measure I created to "read" the slicer and store the value for later use.Example of the report with slicer. Also note the measure I created to "read" the slicer and store the value for later use.

The measure I created contains the formula to read the slicer, only when a single value is selected:

gefilterd scenario = If(CountRows('BOM scenario''s')=1;VALUES('BOM scenario''s'[Bom scenario's]);Blank())

 

Now my problem is that I wanted to use this measure to create a calculated column, based on whether the relevant criterium is met, resulting in a True or False. This calculated column would then be the basis for a visual level filter, thus creating a dynamically filled matrix.

 

As you can see in the printscreen above, I have two Card visuals showing the values for two measures respectively. The first is for: "gefiltered scenario" (which is the measure mentioned before). With the current slicerselection being: "Order > 90dgn", you can see that it returns exactly this value, which means it works as intended.

 

Next I have a different measure (now I am aware this can all be done much easier in one measure, but since I did not get it to work and to clarify the problem, I broke it up into small subsets):

Filter test = "Order > 90dgn" = [gefilterd scenario] 

 

This results in a True or False, intended to be the logical check of an if-then-else-construction, meant to fill a calculated column with either True or False. As you can see, the measure evaluates to True, which it is supposed to.

 

Finally (and this is where things go wrong), I want to fill the calculated column:

Show values = if([Filter test]=True();True();False())

 

However, the result (column type as boolean) is not what I should be:

resulting calculated column does not fill appropriate.resulting calculated column does not fill appropriate.

No matter what I try, the calculated column refuses to fill as desired. If I use a text result rather than a boolean, the column stays blank. What am I missing here?

 

p.s. Right now, this uses just one criterium, however, when this works, naturally the other columns with criteria will be added to the formula, but that would be a small change. I figure that if one works, more than one will work too.

 

Thank you for your help,

 

Best regards,

Niels


Viewing all articles
Browse latest Browse all 213916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>