Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Need help with DAX please!!

Hi.
 
I am trying to do something that seems fairly simple but failing miserably. My background data is in a SharePoint list.
 
I am trying to accomplish the following:
 
Total number of items / rows that match the following calculation:
 
Importance = "1" AND Results = "Success" FOR EACH Area (A through D)
 
Choice Fields:
 
Importance
  • 1
  • 2
  • 3
 
Results
  • Success
  • Partial Success
  • Disappointment
 
Area
  • A - Con
  • B - Acc
  • C - CC
  • D - CL
 
THANK YOU VERY MUCH FOR ANY AND ALL HELP! TENA
  • Hello there Anonymous ! If I understood your question correctly I think you dont need the 'Measures of Success'[Area] = "A - Con" condition in your calculate formula since PBI will do it when you add the measure to the table/matrix visual. Try adding this measure to your table/matrix visual:

    Impt1S =
    CALCULATE (
    COUNTROWS ( 'Measures of Success' ),
    'Measures of Success'[Importance Text] = "1",
    'Measures of Success'[Results] = "Success"
    )

     Hope this answer solves your problem! If you need any additional help please @ me in your reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
    Thanks!

    You can also check out my LinkedIn!

    Best regards,
    Gonçalo Geraldes

7 Replies

  • Anonymous how your raw data look like? Can you post it in a table format with the expected output? Not sure that blue image is how your raw data table looks like. 

  • Hello there Anonymous could you please share how are you currently calculating your fields? A sample measure would be enough just to know where the values are!

     

    For additional help, please @ me in your reply!

    You can also check out my LinkedIn!

    Best regards,
    Gonçalo Geraldes

    • Anonymous's avatar
      Anonymous
      Not applicable

      goncalogeraldes 

       

      Thank you SO much!  I am including the measures I used for the calculations.  I am new to Power BI so I hope it makes sense.  Thanks!

       

      First measure to get number of items with an Importance of "1" for Area "A - Con"

       

      Impt1A =
      CALCULATE (
      COUNTROWS ( 'Measures of Success' ),
      'Measures of Success'[Importance Text] = "1",
      'Measures of Success'[Area] = "A - Con"
      )

      Second measure - using first measure - to calculate the number of items with Result of "Success"

       

      Impt1AS =
      CALCULATE (
      [Impt1A],
      'Measures of Success'[Results] = "Success"
      )

      • goncalogeraldes's avatar
        goncalogeraldes
        Icon for Super User rankSuper User

        Hello there Anonymous ! If I understood your question correctly I think you dont need the 'Measures of Success'[Area] = "A - Con" condition in your calculate formula since PBI will do it when you add the measure to the table/matrix visual. Try adding this measure to your table/matrix visual:

        Impt1S =
        CALCULATE (
        COUNTROWS ( 'Measures of Success' ),
        'Measures of Success'[Importance Text] = "1",
        'Measures of Success'[Results] = "Success"
        )

         Hope this answer solves your problem! If you need any additional help please @ me in your reply.
        If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
        Thanks!

        You can also check out my LinkedIn!

        Best regards,
        Gonçalo Geraldes