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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Molin
Helper I
Helper I

Calculating groups

Dear community, 

I am facing a challenge to group sales from a fairly simple table. 

The table have total sales generated on both "OrderType" and "SalesChannel" which sums up to the same. However I would like to change the setup with the following needs, preferably through dax (running direct query): 

 

  • "Dining-In Sales" should only appear once
  • "Pick-Up Sales" should be zeroed
  • "Online Sales" should be calculated as follows: Online Sales - all Providers Sales

The decired result you can see on the right hand side. 

Thanks in advance. 

Sales Table.png

2 REPLIES 2
Molin
Helper I
Helper I

Hi Eason, 

Thanks a lot for the help. It all make sense, except the "Online Sales" line as I cant get it to subtract the [Providers Sales]. Do I need a RemoveFilter to calculate the [Providers Sales] or how do I get it to link with the "Online Sales" row? 

Thanks in advance.  

v-easonf-msft
Community Support
Community Support

Hi, @Molin 

You may need create another measure like:

New Sales =
SWITCH (
    MAX ( 'Table'[Provider] ),
    "Dining-In Sales", BLANK (),
    "Pick-Up Sale", 0,
    "Online Sales", [Online Sales] - [Providers Sales],
    [Sales]
)

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.