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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
justinremy
Frequent Visitor

Subtotals not adding up from measure

Hi all,

I currently have two a matrix table which shows how many tables need to be opened by a certain day and time. I want to add a parameter which only affects tables that have a negative number which means they require tables to be closed. I have tried doing this by an if measure but it seems to result in the subtotals not calculating properly and only changing by the number in the parameter despite the matrix table being based on day and hour. What would the solution be to this? 


In this example, the parameter is 2

justinremy_0-1691558421600.png

justinremy_1-1691558431990.png

 

 

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @justinremy , 

Pleasee have a try.

Create another measure based on [removing tables]. 

result =  
var _b = SUMMARIZE('table','table'[day],"aaa",'table'[removing tables])
return
IF(HASONEVALUE('table'[day]),[removing tables],SUMX(_b,[aaa]))

Or you can change the 'table'[day] to the unique column like index and so on.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @justinremy , 

Pleasee have a try.

Create another measure based on [removing tables]. 

result =  
var _b = SUMMARIZE('table','table'[day],"aaa",'table'[removing tables])
return
IF(HASONEVALUE('table'[day]),[removing tables],SUMX(_b,[aaa]))

Or you can change the 'table'[day] to the unique column like index and so on.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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