Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Grouping in Matrix is Strange

I have simple dataset and my calculations are around specialty. So I always group results by specialty. When I tried to display the measures I created they show calculations correctly if the first co...
  • d_gosbell's avatar
    d_gosbell
    7 years ago

    Anonymous wrote:

    d_gosbell  thank you for the reply. Your suggestion will be perfect if my client does not require the Provider ID to be included in the Matrix visual at the beginning before Specialty . 


    Oh, sorry - I think I misunderstood what you were expecting to see in the second table. 

     

    I believe that what you are actually seeing is an issue with ALLEXCEPT where it strips off even implied crossfilters. Probably a safer pattern to use is a combination of ALL and VALUES

     

    eg

     

    Number of Unique Claims COMM = CALCULATE(DISTINCTCOUNT(Sheet1[ClaimNo]),ALL(Sheet1),VALUES(Sheet1[Specialty]),Sheet1[MA/COM]="COM")

     

    The SQLBI guys have a blog on this topic, the last few paragraphs summarize this issue

    https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/