Forum Discussion
GTS_ONE
8 years agoAdvocate II
Can a Measure sum other rows besides itself?
Hi all, So I know that the scenario I'm about to describe can rather easily be done by creating summary tables and joining them, etc. But we have a particular situation where we're trying to see...
- 8 years ago
Hi, try with this measure:
Does ID Have Only Blue? = IF ( HASONEVALUE ( Table1[ID] ), IF ( SELECTEDVALUE ( Table1[Color] ) = "Blue", IF ( COUNTROWS ( FILTER ( ALL ( Table1 ), Table1[ID] = SELECTEDVALUE ( Table1[ID] ) ) ) = 1, "Yes", "No" ), "No" ) )Regards
Victor
Lima - Peru
GTS_ONE
8 years agoAdvocate II
Hi,
Well, basically I'm trying to do the measure without knowing which IDs are ONLY Blue. So in this case, I want the ID #4 want to be flagged, but I don't know that in advance.
I need the measure to flag #4 which is only Blue, but not #3, which has both Blue and Red rows.
Vvelarde
8 years agoCommunity Champion
Hi, try with this measure:
Does ID Have Only Blue? = IF ( HASONEVALUE ( Table1[ID] ), IF ( SELECTEDVALUE ( Table1[Color] ) = "Blue", IF ( COUNTROWS ( FILTER ( ALL ( Table1 ), Table1[ID] = SELECTEDVALUE ( Table1[ID] ) ) ) = 1, "Yes", "No" ), "No" ) )
Regards
Victor
Lima - Peru
- GTS_ONE8 years agoAdvocate II
Ah-ha! Yes, that worked - thanks...
- MattAllington8 years agoCommunity Champion
I wrote a blog post about the process of solving this problem here https://exceleratorbi.com.au/killer-tips-write-harder-measures/