0

countif

I'm trying to recreate a function like countif to create a table showing me how many times 1 parameter's element relates to a different parameters element. See diagram for example.

6 replies

null
    • imbarmarinescubar_pyram
    • 7 days ago
    • Reported - view

    Hi  , you can simply create 2 custom measures in formulate app:

    count(if([table].[win/lose] = "Win", 1, null))
    count(if([table].[win/lose] = "Lost", 1, null))

    Then query those measures together with the Name column in the discovery

      • Ricky_Melamed
      • 7 days ago
      • Reported - view

       like this? Doesn't work.

      • imbarmarinescubar_pyram
      • 7 days ago
      • Reported - view

       is that the name of the table and column that you have in the model? I tried with [customers].[country] and it worked fine.

      • Ricky_Melamed
      • 7 days ago
      • Reported - view

       This is the error I get

      • Ricky_Melamed
      • 7 days ago
      • Reported - view

       I just realized I could have just used the count aggregation! I didn't know it was there. Thank you so much for your help though.

      • imbarmarinescubar_pyram
      • 7 days ago
      • Reported - view

       this is failing because of missing ( between the if and the [sheet1]

Content aside

  • Status Answered
  • 7 days agoLast active
  • 6Replies
  • 15Views
  • 2 Following