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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
databot_kd
Helper II
Helper II

DAX - SUM partition by Columns and filters by Date range slicer

Hi community, 

 

i am trying to create a measure that sums the total amount over company, supplier and transaction number but is still filtered based on the date range slicer selection. 

I was able to create a measure that sum the amount over the company, supplier and trx reference but it does not filter based on the slicers selected dates. 

Current DAX = CALCULATE( SUM ( Amout), ALLEXCEPT( COMPANY, SUPPLIER, TRX_CODE)) 

Below screemshot explains the data output i am trying to achieve

databot_kd_0-1706749830672.png

Below is sample data. 

Sample Data
CompanySupplierTrx NumTrans DateAmount
PRQ LtdRusteezeRQ-10001227/12/2023 0:00-10000
PRQ LtdRusteezeRQ-1000125/01/2024 0:0011000
PRQ LtdRusteezeRQ-1000125/01/2024 0:00-1000
ANZ Stainless SteelP1MC -01127/12/2023 0:00-455
ANZ Stainless SteelP1MC -0115/01/2024 0:00455
TribleAASPAS789-0889/01/2024 0:00100
TribleAASPOCMM13810/01/2024 0:00250
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@databot_kd , Try a measure like

CALCULATE( SUM (Table[ Amout] ), filter( allselected(Table), Table[COMPANY] = max(Table[COMPANY]) && Table[SUPPLIER] = max(Table[SUPPLIER]) && && Table[TRX_CODE] = max(Table[TRX_CODE]) ))

 

Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@databot_kd , Try a measure like

CALCULATE( SUM (Table[ Amout] ), filter( allselected(Table), Table[COMPANY] = max(Table[COMPANY]) && Table[SUPPLIER] = max(Table[SUPPLIER]) && && Table[TRX_CODE] = max(Table[TRX_CODE]) ))

 

Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak  for the solution. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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