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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Problem with total statement

Hi ,

i have a problem with my total statement. I have seen that others have got the same issues, but i can't use their solution for my measure. @Ashish_Mathur You were able to help someone else with a similar problem. Do you have a solution for that? 🙂
I have to measure "Product 1 sum at last" - "Product 1 sum at first". I only want to consider the positive values in my result of the measure "Without negative Values". I have attached a screenshot for you and the measures. I tried a Hasonefilter, but it does not work. Do you have a solution for my problem? You would help me a lot. Kind regards Lennard .

 

Product 1 sum "at first" = CALCULATE(SUM('Tabelle1 (2)'[Produkt 1 sum]),'Tabelle1 (2)'[first/ last]="@first")
Product 1 sum "at last" = CALCULATE(SUM('Tabelle1 (2)'[Produkt 1 sum]),'Tabelle1 (2)'[first/ last]="@last")

 

Without negativ Values = IF(HASONEVALUE('Tabelle1 (2)'[Month]), IF([@last - @first]>0,[@last - @first],0))
File.PNG
1 ACCEPTED SOLUTION

Remove the second HASONEVALUE


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

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=If(hasonevalue(HASONEVALUE('Tabelle1 (2)'[Month]),[Without negativ Values],sumx(summarize(values('Tabelle1 (2)'[Month]),'Tabelle1 (2)'[Month],"ABCD",[Without negativ Values]),[abcd]))

Hope this helps.


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

Unfortunately not, i get this error message:

 

"Too many arguments were passed to the HASONEVALUE function. A maximum of 1 arguments are allowed for the function."Test 2.PNG

 

Remove the second HASONEVALUE


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

Thanks a lot. It works 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.