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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to limit the result of a calculation to only positive values using the MAX function, but everytime I use MAX in my calculation it blows up my pivot table by creating millions of rows. Below is my DAX Formula...
ExcessBalance:=MAX([Average of Total Demand]- LOOKUPVALUE(Parameters[Value], Parameters[Parameter], "Max Balance - # of Days")*[Average of Total Demand], 0)
If I just use the calculation without MAX (below) it works fine which leads me to believe that the MAX function is the problem.
ExcessBalance:= Average of Total Demand]- LOOKUPVALUE(Parameters[Value], Parameters[Parameter], "Max Balance - # of Days")*[Average of Total Demand]
The LOOKUPVALUE is finding the "Max Balance - # of Days" row in the parameters table. The parameters table is unrelated to the table where I am trying to create the DAX measure.
What am I doing wrong? What further information do you need to help debug??
Thanks in advance!!
Lee
Hi @Anonymous ,
Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 46 | |
| 44 | |
| 29 | |
| 20 |
| User | Count |
|---|---|
| 202 | |
| 130 | |
| 102 | |
| 71 | |
| 55 |