Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi guys,
I have one collumn with location
My collumn:
| LOCATION |
| PORTUGAL |
| SPAIN |
| SPAIN |
| PORTUGAL |
| SPAIN |
| SPAIN |
| SPAIN |
| PORTUGAL |
| SPAIN |
| ITALY |
| ITALY |
| FRANCE |
| FRANCE |
My measure to calculate the number of countries
| LOCATION |
| PORTUGAL,LISBON |
| SPAIN,MADRID |
| SPAIN,BARCELONA |
| PORTUGAL,LISBON |
| SPAIN,SEVILHA |
| SPAIN,MADRID |
| SPAIN,BARCELONA |
| PORTUGAL,LISBON |
| SPAIN,BARCELONA |
| ITALY,ROMA |
| ITALY,ROMA |
| FRANCE,PARIS |
| FRANCE,PARIS |
It's possible to count example: quantity of MADRID ?
MEASURELOCATION= calculate(counta('Table1'[Coluna1]),Filter(Table1,Table1[LOCATION]="MADRID"))
Solved! Go to Solution.
Hi @Anonymous,
The simplest way of doing it is to simply add the location column to the table and change the aggregation to "Count". This will give you a count of each city.
However, if your requirement is to specifically create measures, you can create one like below :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Hi @Anonymous ,
Please try the measure.
MEASURELOCATION =
CALCULATE (
COUNTROWS ( Table1 ),
FILTER ( Table1, SEARCH ( "MADRID", Table1[LOCATION], 1, BLANK () ) > 0 )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @v-kkf-msft ,
I need to count only by line not to all example
In this case i need measure for madrid and other for spain because in the same cell i can have more than 1: example: SPAIN,MADRID,BARCELONA,MADRID
Best regards and thanks for help
Hi @Anonymous,
The simplest way of doing it is to simply add the location column to the table and change the aggregation to "Count". This will give you a count of each city.
However, if your requirement is to specifically create measures, you can create one like below :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 39 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |