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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Materous
New Member

Power BI Measure, want to keep total value even when filtering by other criteria

I have a measure that I am using to give a holistic value in conjuction with other measures in a data table.

Formula is : Calculate(Sum(TABLE), ALLEXCEPT(COLUMN 1, COLUMN 2). This gives me the value I want. However when I use a slicer or a filter it the measure value changes to match the filter / slicer.


Is there a way to keep this value even when using slicers or other filters.

So keep the value of this measure static while changing the value of other measures.

 

I've tried combinations of ALL, Allselected, Allcrossfiltered and Keep Filters however I may have overlooked or done something incorrectly there.

Additional info : This measure in question is used as a denominator for another measure. Would like to keep this denominator value static.

6 REPLIES 6
steven_j
Frequent Visitor

I figured out the issue.  When I filtered down to a specific date range if there wasn't date for a value for a specific date it wasn't aggregating values properly for that day.  I added a date table and used the date field from the date table and now it is working as intended.

 

punitkhatri
Helper III
Helper III

Hey @Materous , I've created a similar measure and it is working perfectly fine, 

Amount_1 = CALCULATE(SUM(Data[Item amount]), ALLEXCEPT(Data, Data[Location]))
I'll suggest you to look into syntax of ALLEXCEPT function, the first expression should be a table name and the next one should be a column name. You can refer this screenshot, if the problem is in the syntax.
Revert back if I got your problem correctly or If I am wrong.
allexcept.png

Thanks for the reply. Agreed the allexcept does work initially however when applying another filter, whether it be via slicer or another value in the data table it changes the value.

Is there anyway to make sure that the initial value does not change?

 

For more information, my calculation is to get a sum the total column based on a time frame. When applying another slicer I would like that total to remain the same.

amitchandak
Super User
Super User

@Materous , Try if this can help

 

Calculate(Sum(TABLE[Value]), ALL())

 

or

 

Calculate(Sum(TABLE[Value]), ALL(Table))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks for the suggestion however this doesn't work as I do have a few filters that do need to be applied. The ALL() gives me a value that is too big to use.

A good way to rephrase the question might be, is there a way I can get a value that is impacted by only a few filters but only those filters.  

I have this same problem.  The function using all except is suming a value and applying 2 columns to the all except function.  Works exactly as it should until I filter for one of the 2 columns included in the all except function.  At that point some of values that should be static change, other stay where they should.  

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.