Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EIJ
New Member

Measure that can count several numeric answers in column

Hi there, 

 

I have a column in a table in which people can answer 1-10 on a scale. 

I am trying to do a count of all the answers containing 1,2 &3 within that column. 

does anyone know how to do this? I know how to count words and also 0 but not multiple numbers 😞 

 

thank you in advance 

1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Hi @EIJ ,

 

@mh2587 nice method! Thank you, for your quick response and the solution provided.
And you can also try code as below to create measure.

My Sample:

vweiyan1msft_0-1710138988787.png

Count123 = 
SUMX ( 'Table', IF ( 'Table'[Answer] IN { 1, 2, 3 }, 1, 0 ) )

In the Visualizations pane, select the Card icon and put the measure in the card visualization.
Result is as below.

vweiyan1msft_1-1710139018182.png

Is this the result you expect?


Best Regards,
Yulia Yan


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

4 REPLIES 4
v-weiyan1-msft
Community Support
Community Support

Hi @EIJ ,

 

@mh2587 nice method! Thank you, for your quick response and the solution provided.
And you can also try code as below to create measure.

My Sample:

vweiyan1msft_0-1710138988787.png

Count123 = 
SUMX ( 'Table', IF ( 'Table'[Answer] IN { 1, 2, 3 }, 1, 0 ) )

In the Visualizations pane, select the Card icon and put the measure in the card visualization.
Result is as below.

vweiyan1msft_1-1710139018182.png

Is this the result you expect?


Best Regards,
Yulia Yan


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you- this has worked well!

mh2587
Super User
Super User

Count123 = COUNTROWS(FILTER(YourTable, YourTable[YourColumn] IN {1, 2, 3}))

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Thank you. I've tried to use it but how does it show me the total figure? Does it need extra formula to do that? 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.