Forum Discussion
Countrows DAX help
Hi,
I have the following table, looking to create a column with a DAX formula that identies if a Seller has a German Registration. Can anoyne provide that formula pls? I was hoping it would be simple, but having difficulty.
| Seller | Country | DAX Column |
| Seller A | Germany | Yes |
| Seller B | Italy | |
| Seller A | France | Yes |
| Seller A | Italy | Yes |
| Seller C | Germany | Yes |
I just added the country as so:
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! ☺
12 Replies
- NickolajJessenSolution Sage
I feel like this post was also here yesterday..
Specify what you already tried. Specify what suggestions were made yesterday that didn't work.
Are you looking to do it in a measure or a calculated column? Do you have acces to edit the data in power Query?- united2winHelper III
Hi,
Below was already tried, and like mentioned on the other post, it's only returning "Yes" for the German jurisdictions. I'm trying to create a calculated column and yes I have access to power query.
Has German Adress = VAR vSellerCurrentRow = SellerTable[Seller] RETURN IF ( CALCULATE ( COUNTROWS ( SellerTable ), SellerTable[Seller] = vSellerCurrentRow, SellerTable[Country] = "Germany" ) > 0, "Yes", BLANK ()
- NickolajJessenSolution Sage
Does this work?
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊- united2winHelper III
Still only returns on the German jurisdiction. I'm looking to see if a Seller has a DE jurisdiction and then extrapoloate that across the other jurisdictions. Like below:
Seller Country Calculated DAX Column A DE Yes A IT Yes B DE Yes A FR Yes C FR - NickolajJessenSolution Sage
I just added the country as so:
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! ☺
- Tahreem24Super User
united2win You can try this Measure:
Measure = If(COUNTROWS(FILTER(TableSeller,TableSeller[Country]="Germany"))>0,"Yes","No")- united2winHelper III
Same issue as below, the first row in your table should return "Yes" as Seller A has a jurisdiction in Germany.