Forum Discussion
Is this Dynamic Value segmentation?
- 4 years ago
Hi ING_BT ,
Based on the description you have you need to do a measure similar to this one:
Count Words on ranking = VAR temptable = SUMMARIZE ( words, Words[Brand], Words[Keyword], "AVerageRanking", AVERAGE ( Words[Rank] ) ) RETURN COUNTROWS ( FILTER ( temptable, [AVerageRanking] <= MAX ( Ranking[End] ) && [AVerageRanking] >= MIN ( Ranking[Start] ) ) )I have added some words counts on the Brand A and has you can see the total word count is 2 always:
Be aware that this calculation is at a brand level if your try to do it with all brands at all ranking the calculation is incorrect has you can see in the Total column below
I think the Table 2 is the one I am looking for.
As, if for the selected period (with several dates), a brand has no rank at all on 10 keywords; I need to display these 10 keywords inside that +50 Not Ranked interval.
However, if there is a keyword where it has as rank but only on a few dates, it should be counted in the average, example:
Label is in the interval (2+2+10)/3=4.6 => 4 to 10
(empty are (null) and not "0" in the data, which simplyfies things?)
| 10/12 | Label | (null) |
| 16/12 | Label | 2 |
| 21/12 | Label | 10 |
| 27/12 | Label | 2 |
| 31/12 | Label | (null) |
(appologiesfor the late answer)
Thank you!
Sorry for the additional question but on this case of label will label show up in the no label words or since it was counted in the rank it wont count again?
- MFelix4 years agoSuper User
Hi ING_BT ,
Try the following measure:
Count Words on ranking = VAR temptable = SUMMARIZE ( FILTER ( words, NOT ( ISBLANK ( Words[Rank] ) ) ), Words[Brand], Words[Keyword], "AVerageRanking", AVERAGE ( Words[Rank] ) ) VAR temptable_Blanks = FILTER ( SUMMARIZE ( words, Words[Brand], Words[Keyword], "AVerageRanking", AVERAGE ( Words[Rank] ) ), [AVerageRanking] = 0 ) VAR WordsWithRank = COUNTROWS ( FILTER ( temptable, [AVerageRanking] <= MAX ( Ranking[End] ) && [AVerageRanking] >= MIN ( Ranking[Start] ) ) ) RETURN IF ( HASONEVALUE ( Ranking[Sort] ) && SELECTEDVALUE ( Ranking[Sort] ) <> "+50 and Others", WordsWithRank, WordsWithRank + COUNTROWS ( temptable_Blanks ) ) - ING_BT4 years agoHelper I
Indeed, as the measure "average" for the label will show a valide outcome "4.6" it will not be counted again in the "Not ranked", as it should display only average = (null) (as it the keyword has no rank on any of the selected dates)!
Does it help? - ING_BT4 years agoHelper I
Wow. Just wow, it works perfectly! You are a genius and a lifesaver (well project saver haha)
Thank you so much for your time! 😎Have a great weekend,
All the best,
Bt.