Forum Discussion

united2win's avatar
united2win
Helper III
4 years ago
Solved

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
  • I just added the country as so:

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

     

12 Replies

  • 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?

    • united2win's avatar
      united2win
      Helper 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 ()

       

       

  • Does this work?

     

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

    • united2win's avatar
      united2win
      Helper 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: 

       

      SellerCountryCalculated DAX Column
      ADEYes
      AITYes
      BDEYes
      AFRYes
      CFR 
      • NickolajJessen's avatar
        NickolajJessen
        Solution Sage

        I just added the country as so:

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

         

  • united2win You can try this Measure:

    Measure = If(COUNTROWS(FILTER(TableSeller,TableSeller[Country]="Germany"))>0,"Yes","No")
     
    • united2win's avatar
      united2win
      Helper III

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