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
Another simple one I'm hoping to get some help with to boost my learning (YouTube is a minefield!!)
I have 2 columns - Sentiment (contains various sentiment values) & Theme (contains themes derived from my made-up data)
I want to count the number of times the text "Positive" appears under SENTIMENT in the same row as the word "Person" under THEME so that I can calculate the % of the number of times a Person is considered Positive
I've already created a measure for the Total Number of Rows but if there is an easier way of incorporating that into a single formula that would be much better as I want to learn the cleanest method of coding possible
Thanks
Dan_B
Solved! Go to Solution.
Hi, @Daniel_B
If I understand you correctly, you want to divide the number of times a Person is considered Positive by the total number of rows in one formula. In this case , try the following DAX:
Result =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', [Sentiment] = "Positive" && 'Table'[Theme] = "Person" )
)
/
COUNTROWS ( 'Table' )
Please leave a message for any updates.
Best,
Paul
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Daniel_B
If I understand you correctly, you want to divide the number of times a Person is considered Positive by the total number of rows in one formula. In this case , try the following DAX:
Result =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', [Sentiment] = "Positive" && 'Table'[Theme] = "Person" )
)
/
COUNTROWS ( 'Table' )
Please leave a message for any updates.
Best,
Paul
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Could you post a small table of sample data and the text of the measure you created?
Help when you know. Ask when you don't!
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |