Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have created a calculated measure based on various fields. This evaluates each name with a rating from A to E ('Rating').
Now I would like to show in diagrams how many names ('Names') I have per rating level. Since the rating is a measure and not a dimension, I cannot use it as desired. My approach is therefore to create another separate measure for each rating level (i.e. 5 in total), which I can then use in a bar chart, for example.
Here is my approach for Rating = A
Count(If(Rating = 'A', Name))
and
Count({<Rating = {'A'}>} Name)
Now to my problem: It seems that the reference to 'Rating' as measure in the formula does not work. If I replace it with a field from my script for testing purposes, it works.
Does anyone here have an idea?
Best regards
Christian
Just wondering what's avoiding you from using Rating as a dimension and Count(Name) as a measure? This way you can see the count of name by different ratings.
It simply does not appear in the list under "Add dimension" in the chart. I only have access to the fields here. I could only add it to the chart as a measure.
That's odd. Then how did you get Rating = A, B etc or even use the field in the set analysis? If the 'Rating' field simply doesn't exist and you can't modify the script, you can create a calculated dimension with ValueList function like ValueList('A', 'B', 'C', 'D', 'E').
Roughly summarized: I have fields from the script, have evaluated each of these with variables (score from 0 to 10), which I have then calculated into a total score using a new measure and then converted into a rating using variables. Everything was mainly solved with "if-functions".
The Value List at least shows me something in the diagram, but unfortunately not the correct value 😕
@Christian_ what is Rating measure expression?
if([Score]>=$(vScoringBewertungA),dual('A',1),
if([Score]>=$(vScoringBewertungB),dual('B',2),
if([Score]>=$(vScoringBewertungC),dual('C',3),
if([Score]>=$(vScoringBewertungD),dual('D',4),
dual('E',5)
)
)
)
)
@Christian_ create chart with below dimension & measure
Dimension:
= valuelist ('A','B','C','D','E')
Measure:
=pick(match(valuelist ('A','B','C','D','E'),'A','B','C','D','E'),
Count({<[Score]={">=$(vScoringBewertungA)"}>} Name),
Count({<[Score]={">=$(vScoringBewertungB)"}>} Name),
Count({<[Score]={">=$(vScoringBewertungC)"}>} Name),
Count({<[Score]={">=$(vScoringBewertungD)"}>} Name),
Count({<[Score]={">=$(vScoringBewertungE)"}>} Name))
Unfortunately, it doesn't work either:
Score is also a measure and not just a field from the script. Could this be causing a problem?
@Christian_ That's what I asked. What is the expression of Score measure?