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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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 , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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

NickolajJessen
Solution Sage
Solution Sage

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 😞

Anonymous
Not applicable

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
Solution Sage
Solution 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?

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.