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
Datagulf
Responsive Resident
Responsive Resident

Adding up subsequent Sites and checking the limit to be lower than 100,000

Hi Community,

I have a table(Accounts) that has the company's names and the respective site names. These companies could have many sites or even one site. Each site name has it is billed Amount as shown below.

COMPANY NAMESITE NAMEBilled AmountEntry Date
Company AHQ130001/4/2021
Company ANew York6700024/5/2021
Company ASeattle450001/6/2021
Company BCalifornia1070010/6/2021
Company CFlorida2300027/6/2021
Company CCalifornia110001/7/2021
Company DToronto13300013/7/2021
Company DNew York7400021/7/2021
Company DSeattle1300028/7/2021
Company EToronto1270007/8/2021


 I am creating a measure that adds all Billed amounts for the company names and displays the value above 100K in a matrix table. I was using this formula below but it shows inconsistencies when I add a date filter. 

 

 

 

 

Top 100K accounts  = Sumx(filter(summarize(Accounts, Accounts[Site_name], "_1", sum(Accounts[Billed Amount])), [_1] >100000), [_1])

 

 

 

I have tried to use the filters too, and it is not correct but I accept all answers as long as they work. Thanks in advance.

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@Datagulf Perhaps try:

Top 100K accounts = 
  SUMX(
    FILTER(
      GROUPBY(
        'Accounts', 
        'Accounts'[Site_name], 
        "_1", SUMX(CURRENTGROUP(),'Accounts'[BilledAccount])
      ),
      [_1] > 100000
    ),
    [_1]
  )

Otherwise, need more information on the inconsistencies.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@Greg_Deckler this works but with Accounts['Company Name']. Thanks

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Datagulf Perhaps try:

Top 100K accounts = 
  SUMX(
    FILTER(
      GROUPBY(
        'Accounts', 
        'Accounts'[Site_name], 
        "_1", SUMX(CURRENTGROUP(),'Accounts'[BilledAccount])
      ),
      [_1] > 100000
    ),
    [_1]
  )

Otherwise, need more information on the inconsistencies.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler this works but with Accounts['Company Name']. Thanks

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.