Forum Discussion

Samiks95's avatar
Samiks95
Regular Visitor
3 years ago
Solved

Creating Dax Success or Failure

   I have a column of Collected at club Percentage. I have different % here. If club has atleast collected 4 or more than 4% it's success. And if its less than 4% , its failed. How do I create a dax for this. Please help

  • Anonymous's avatar
    Anonymous
    3 years ago

     Hello Samiks95 ,

    for new column:

    Text = If( [Collected at Club Percentage]< 0.04,"Failed","Success"

     

    and for measure :

    Text = If( selectedvalue(table[Collected at Club Percentage])< 0.04,"Failed","Success"

    if you find this helpful please accept as solution and a kudos is appreciated

     

2 Replies

  • Hi Samiks95 ,

    Please try this measure. It will return your expected results depending how it is used.

    Club Grade = 
    VAR countGreaterThan4Per =
    COUNTROWS(
    FILTER(
    'Sample Data',
    'Sample Data'[Decimal Percentage] > 0.04
    )
    )

    RETURN
    IF(
    HASONEVALUE('Sample Data'[Club]),
    IF(
    countGreaterThan4Per >= 4,
    "Success",
    "Fail"
    )
    )

     

    Results in a table visual

     

  • Anonymous's avatar
    Anonymous
    Not applicable

     Hello Samiks95 ,

    for new column:

    Text = If( [Collected at Club Percentage]< 0.04,"Failed","Success"

     

    and for measure :

    Text = If( selectedvalue(table[Collected at Club Percentage])< 0.04,"Failed","Success"

    if you find this helpful please accept as solution and a kudos is appreciated