Forum Discussion
Creating measure by adding column value
Hi All,
I have a dataset with values like below
ABCD Theatre 1 100
ABCE Theatre 2 300
ABCE Theatre 4 200
ABCD Theatre 3 150
GABC Theatre 1 120
PLK Theatre 2 100
ABCE Theatre 5 125
| Movie | Theatre | TicketCharge |
| ABCD | Theatre 1 | 100 |
| ABCE | Theatre 2 | 300 |
| ABCE | Theatre 3 | 200 |
| ABCD | Theatre 4 | 150 |
| GABC | Theatre 3 | 120 |
| PLKE | Theatre 4 | 100 |
| ABCE | Theatre 5 | 125 |
I need to create a measure with sum of ticketcharge where movie name contains ABC with output ABC-1075
Need help for this.
I treid like below
MEASURE = SUMX('MOVIETABLE',FILTER('MOVIETABLE','MOVIETABLE'['Movie'] = 'ABC'),TicketCharge)
giving errors.
Hi Anonymous,
You can create a measure below:
Measure = SUMX(FILTER(ALL('Table'),SEARCH("ABC",'Table'[Movie],1,0)>0),'Table'[TicketCharge])Best Regards,
Qiuyun YuAnonymous
If you need at the start
MEASURE = SUMX('MOVIETABLE',FILTER('MOVIETABLE',left('MOVIETABLE'['Movie'],3) = "ABC"),TicketCharge)
Anywhere in the string
MEASURE = SUMX('MOVIETABLE',FILTER('MOVIETABLE',search("ABC",'MOVIETABLE'['Movie'],1,0)>0 ),TicketCharge)
SumABC = CALCULATE(SUM('Table'[TicketCharge]),FILTER('Table',FIND("ABC", 'Table'[Movie],,0)<>0))
4 Replies
- amitchandakSuper User
Anonymous
If you need at the start
MEASURE = SUMX('MOVIETABLE',FILTER('MOVIETABLE',left('MOVIETABLE'['Movie'],3) = "ABC"),TicketCharge)
Anywhere in the string
MEASURE = SUMX('MOVIETABLE',FILTER('MOVIETABLE',search("ABC",'MOVIETABLE'['Movie'],1,0)>0 ),TicketCharge)
- v-qiuyu-msftCommunity Support
Hi Anonymous,
You can create a measure below:
Measure = SUMX(FILTER(ALL('Table'),SEARCH("ABC",'Table'[Movie],1,0)>0),'Table'[TicketCharge])Best Regards,
Qiuyun Yu- shameeralikvqaNew Member
SumABC = CALCULATE(SUM('Table'[TicketCharge]),FILTER('Table',FIND("ABC", 'Table'[Movie],,0)<>0))
- AnonymousNot applicable
Thanks shameeralikvqa