Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Custom Subtotal

Hi All !!   Im a newbie in PowerBI and still learning so thanks for any advice you could give. My problem is simple i think i Have the following matrix and what i need is that subtotal  sums the am...
  • d_gosbell's avatar
    7 years ago

    In the following expression I'm taking a wild guess as to what some of your table and column names might be. But the general idea is that we can use IF( HASONEVALUE(...)  to check if there is a single Opportunity in the current filter context. This will return true for each of the rows that has a single opportunity, but false for the grand total (where multiple opportunities are in scope)

     

    eg.

     

    IF ( HASONEVALUE( Opportunity[Opportunity] )
      , [Amount]
      , SUMX( 'Opportunity', 'Opportunity'[Probability%] * [Amount] )