cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
united2win
Helper III
Helper III

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. 

 

SellerCountryDAX Column
Seller AGermanyYes
Seller BItaly 
Seller AFranceYes
Seller AItalyYes
Seller CGermanyYes
1 ACCEPTED SOLUTION

I just added the country as so:

NickolajJessen_0-1653040174473.png

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! ☺

 

View solution in original post

12 REPLIES 12
Tahreem24
Super User
Super User

@united2win You can try this Measure:

Measure = If(COUNTROWS(FILTER(TableSeller,TableSeller[Country]="Germany"))>0,"Yes","No")
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , and Fortune 500 Companies Analysis

Same issue as below, the first row in your table should return "Yes" as Seller A has a jurisdiction in Germany. 

NickolajJessen
Super User
Super User

Does this work?

NickolajJessen_0-1653039221303.png

 

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

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: 

 

SellerCountryCalculated DAX Column
ADEYes
AITYes
BDEYes
AFRYes
CFR 

I just added the country as so:

NickolajJessen_0-1653040174473.png

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! ☺

 

This is exactly what I'm looking for, did you create this as a measure or new column? I've copied the DAX into a new column, but still getting "Yes" only for Germany 😞

A measure 😊

And would it be possible to get the same as a calculated column?

Yes, neat trick is to just wrap the measure in a calculate 

NickolajJessen_0-1653043238022.png

nb. countrows being the measure we created above.

Also it would have been better to know, that a calculated column was needed, when i asked in message 2. 😅

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

 

Still only returning German addresses unfortunatley. Sorry, I thought I already mentioned that, thanks for your help on this...Very muc appreciated. 

 

Also copied the measure.

united2win_1-1653044084747.png

 

 

united2win_0-1653044035487.png

 

NickolajJessen
Super User
Super User

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?

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 ()

 

 

Helpful resources

Announcements
Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.