cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

MovieTheatreTicketCharge
ABCDTheatre 1100
ABCETheatre 2300
ABCETheatre 3200
ABCDTheatre 4150
GABCTheatre 3120
PLKETheatre 4100
ABCETheatre 5125


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.

3 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @pg-gopinathan

 

You can create a measure below: 

 

Measure = SUMX(FILTER(ALL('Table'),SEARCH("ABC",'Table'[Movie],1,0)>0),'Table'[TicketCharge])
 
a2.PNG
 
Best Regards,
Qiuyun Yu
Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Super User IV
Super User IV

@pg-gopinathan 

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)

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted

SumABC = CALCULATE(SUM('Table'[TicketCharge]),FILTER('Table',FIND("ABC", 'Table'[Movie],,0)<>0))

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @pg-gopinathan

 

You can create a measure below: 

 

Measure = SUMX(FILTER(ALL('Table'),SEARCH("ABC",'Table'[Movie],1,0)>0),'Table'[TicketCharge])
 
a2.PNG
 
Best Regards,
Qiuyun Yu
Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Super User IV
Super User IV

@pg-gopinathan 

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)

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted

SumABC = CALCULATE(SUM('Table'[TicketCharge]),FILTER('Table',FIND("ABC", 'Table'[Movie],,0)<>0))

View solution in original post

Highlighted

Thanks @shameeralikvqa 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors