Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all, looking for help with a measure please...
I have measure (see below) which is searching for a given term in phrases in another table. I am displaying the output in a table visual with term as column 1 and count of term as column 2. I'd like to create a measure that sums up the phrase volumes. I've included tables and desired output below.
Measure1 = VAR CurrWord = SELECTEDVALUE ( 'Table1'[term] ) RETURN COUNTROWS ( CALCULATETABLE ( VALUES ( Table2[phrase]), FILTER ( Table2 , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))
Table1
Term |
apples |
oranges |
bananas |
Table2
Phrase | Phrase Volume |
I like apples and oranges | 100 |
I do not like bananas | 200 |
I love apples the most | 300 |
DESIRED OUTPUT TABLE VISUAL:
Term | Measure 1 | Measure 2? |
apples | 2 | 400 |
oranges | 1 | 100 |
bananas | 1 | 200 |
Solved! Go to Solution.
you are nearly there, instead of doing
COUNTROWS ( CALCULATETABLE ( VALUES ( Table2[phrase]), FILTER ( Table2 , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))
you can do
calculate(sum( Table2[phrase volume]), FILTER ( Table2 , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
you are nearly there, instead of doing
COUNTROWS ( CALCULATETABLE ( VALUES ( Table2[phrase]), FILTER ( Table2 , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))
you can do
calculate(sum( Table2[phrase volume]), FILTER ( Table2 , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Thanks for your help! It seems so easy when you know the answer 😛
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |