cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mattlcook Frequent Visitor
Frequent Visitor

Measure that only displays if subtotal greater than 1,000,000

Hi,

 

I have a table that contains Clients and Parent Clients.  I'm trying to write a DAX measure that displays total revenue at the client level IF the sum of total revenue for the Parent Client is >= 1,000,000 (for example).  I tried:

 

CALCULATE( [Revenue],
   FILTER (
      ADDCOLUMNS(SUMMARIZE ( client, client[ParentClientNumber]), "xx", [Revenue]),
      [xx] >= 1000000
     )
)

 

If I try to nest this measure against ClientNumbers, it only shows where ClientNumber >= 1,000,000 (regardless of what the ParentClient total is).  


Thanks for any help.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Measure that only displays if subtotal greater than 1,000,000

Hi @mattlcook ,

Sorry for the delay.

For your requirement, you could create the measure below by my test.

Please note that the measure [Sum] is the same as your [Revenue] measure.

Measure =
VAR a =
    CALCULATE (
        SUM ( 'Table'[Revenue] ),
        ALLEXCEPT ( 'Table', 'Table'[Parent Client] )
    )
RETURN
    IF ( a > 1000000, [Sum], BLANK () )

Here is the output.

Capture.PNG

For more details, you also could refer to my attachment.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Measure that only displays if subtotal greater than 1,000,000

Hi @mattlcook ,

I still have a little confused about your scenario.

If it is convenient, could you share some data sample which could reproduce your scenario and your desired output so that we could help further on it?

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mattlcook Frequent Visitor
Frequent Visitor

Re: Measure that only displays if subtotal greater than 1,000,000

Hi, thanks for the reply.  Here is a screenshot of a simple report showing two parent clients, with their clients nested, as well as three measures.  The first measure "Revenue" is just sum(Revenue).  The second measure "Tier 1 Revenue Current", which is based on the DAX in my original post.  The third measure is "Tier 1 Revenue Desired", which is the measure I'm trying to build.  Both Tier 1 Revenue measures supress parent client "xyz" because it's total Revenue is less than 1,000,000.  However, you can see that the second measure also supresses client abc1 because it's Revenue is less than 1,000,000.  I don't want to do this.  The third measure "Tier 1 Revenue Desired" produces the result I am looking for.  I am trying to determine the DAX to calculate "Tier 1 Revenue Desired".

 

image.png

 

Hope that helps.  Thanks.  

Community Support Team
Community Support Team

Re: Measure that only displays if subtotal greater than 1,000,000

Hi @mattlcook ,

Sorry for the delay.

For your requirement, you could create the measure below by my test.

Please note that the measure [Sum] is the same as your [Revenue] measure.

Measure =
VAR a =
    CALCULATE (
        SUM ( 'Table'[Revenue] ),
        ALLEXCEPT ( 'Table', 'Table'[Parent Client] )
    )
RETURN
    IF ( a > 1000000, [Sum], BLANK () )

Here is the output.

Capture.PNG

For more details, you also could refer to my attachment.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

mattlcook Frequent Visitor
Frequent Visitor

Re: Measure that only displays if subtotal greater than 1,000,000

Thank you - this is great.  My only question is whether the formula can be updated to show the Grand Total as the sum of all Parent Companies greater than 1,000,000.  If the example below, the grand total should be 7,154,100.  

 

I was going to create it using an ISFILTERED function, but you may have a more efficient approach.

 

 

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors