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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Bmejia
Super User
Super User

Total Min/Max measure where and keep the value static

Hi, 
I have a measure that calculates the minimum/Max,  that I need to remain static no change when a date(Filter) is applied, but I also need to be able to add the "Total" value, currently I get zero for the total.  I have added hasonevalue and summarized data to get the "Total" but it excludes anything withing the date range that does not have a value.

I know this will give me all the value where they be static, but total will be zero.

Inventory W Not Total =
CALCULATE(
    MIN(Purchase_Sold[Available Physical]),All('Calendar'[Date]))

But when I add the "Total",  it excludes the values that are not within the calendar date range.  I have used for "HASONEVALUE" and removed and it still excludes the values.

Inventory W Total =
IF(
    HASONEVALUE( 'Purchase_Sold'[ITEMID]),
    CALCULATE(MAX( 'Purchase_Sold'[Available Physical] ),ALL('Calendar'[Date])),
    SUMX(
        SUMMARIZE( 'Purchase_Sold', 'Purchase_Sold'[ITEMID], "Invt", CALCULATE(MAX( 'Purchase_Sold'[Available Physical] ),ALL('Calendar'[Date]))),
        [Invt]
    )
)

Example: I want to be able to see everything that is in Inventory like Inventory W no total (2nd Column) but with total of all values.
Bmejia_2-1775681379157.pngBmejia_3-1775681403688.png

 

 



2 ACCEPTED SOLUTIONS

cut the connection between the tables and then use TREATAS in your measures to transfer the filter as needed.

 

lbendlin_0-1775759532263.png

 

View solution in original post

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1775805627757.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Bmejia
Super User
Super User

Thank You!!, Ashish & Ibendlin,
 
Both solutions seem to work, as long as there is a transaction in the date range. 
 
Ibendlin, I created a summarize table and cut the relationship, In order to keep the date table connected.  I cannot remove the relationship because there are other measures that are linked and need to add the month and year as a column as well.
 
Sample of new issue:
 
Bmejia_0-1775845817502.png

 

Thank you both!!
I believe I was able to fix the issue by generating a independent table with the products then calling it on my measu
re as below "Manual_List[Product].  Using the Treatas function as Lbendlin had suggested for the date table.

 

Updated Measure=

CALCULATE(
IF(
HASONEVALUE( 'Invt_Aval'[Product]),
CALCULATE(MIN( Invt_Aval[Available] )),
SUMX(
SUMMARIZE( 'Invt_Aval', 'Invt_Aval'[Product], "Invt", CALCULATE(MIN('Invt_Aval'[Available]))),
[Invt]
)
)
,TREATAS(VALUES(Manual_Items_List[Product]),Invt_Aval[Product]))



 

Bmejia
Super User
Super User

 

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1775805627757.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

cut the connection between the tables and then use TREATAS in your measures to transfer the filter as needed.

 

lbendlin_0-1775759532263.png

 

krishnakanth240
Resident Rockstar
Resident Rockstar

Hi @Bmejia 

Please share the sample data of table in text format

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.