Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mattlcook
Regular 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

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
v-piga-msft
Resident Rockstar
Resident Rockstar

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.

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.  

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.