Forum Discussion

bergen288's avatar
bergen288
Icon for Helper IV rankHelper IV
3 years ago

Create a measure for cases with multiple assignees in text box.

I have the following 2 meausres in my Power BI report:

Number of Cases = DISTINCTCOUNTNOBLANK('PBI_XZ_Case_Time_Session'[Case_ID])
Number of Assignees = DISTINCTCOUNTNOBLANK('PBI_XZ_Case_Time_Session'[Created_By])
In the screenshot below, the table has the list of Cases with multiple assignees: the total cases with multiple assignees are 297,371.  How may I create a new measure so that the total cases with multiple assignees (297,371) can be used in a text box?

 

5 Replies

  • WinterMist's avatar
    WinterMist
    Icon for Impactful Individual rankImpactful Individual

    bergen288 

     

    I'm not able to test it without access to the data, but it looks like you just need to create the following new measure that includes your visual filter.

     

    Number of Cases V2 =
    CALCULATE(
      [Number of Cases],
      [Number of Assignees] >= 2
    )

     

    Hopefully that works.

     

    Regards,

    Nathan

    • bergen288's avatar
      bergen288
      Icon for Helper IV rankHelper IV

      Nathan:

       

      I tried, but got the following error:

       

  • I did a search and found the following page: https://p3adaptive.com/2012/06/filter-when-why-how-to-use-it/.  So I modified my measure as below:

    Number of Cases V2 =
    CALCULATE(
      [Number of Cases],
      FILTER('PBI_XZ_Case_Time_Session', [Number of Assignees] >= 2)
    )
    Now there is no DAX error, but it doesn't show any number in text box.  What's wrong with it?

     

     
  • WinterMist's avatar
    WinterMist
    Icon for Impactful Individual rankImpactful Individual

    Interesting.  The only time I've seen that icon is when an item is hidden in the data fields pane.

    But clearly these measures are not hidden.  So I'm confused.

     

    Perhaps a DAX guru will see this and provide the answer.

     

    If not, I'm afraid I would need a small test data set to investigate further.

    Without being able to replicate the problem, I'm stuck at this point.

     

    Regards,

    Nathan

  • Below is my updated measure to show if the value is blank or not.

    Number of Cases V2 =
        VAR __Case2 =
            CALCULATE( [Number of Cases], FILTER( 'PBI_XZ_Case_Time_Session', [Number of Assignees] >= 2) )
        RETURN IF(ISBLANK(__Case2),"N/A",FORMAT(__Case2, "General Number"))
     And the screenshot below shows the result is blank. So what's wrong with my measure?