Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have this table visual. This is some products and the state of each of it. I made a sample formula to calculate the volume depending of the state:
IF(State = 6 ; PMP_NET ; PMP_GROSS)
Pmp_Gross is a new calculated column = Pmp_Net * 1,08.
It does not work for the first row of the table but for the other product, it does. And for the total row at the bottom it also does not work. It take the sum of PMP_NET * 1,08. If I remove the first product, the total became exact. It's like the IF expression is looking to all rows and if all rows <> 6, the result is false.
Thanks.
If you are creating a measure, you cannot use IF() that way as it doesn't understand when you pass it a column. You would need use something like:
Test IF =
IF(
MAX(Table1[val])=6,
MAX(Table1[state1]),
MAX(Table1[state2])
)If you are trying it in a calculated column, I'd need to see your exact formula, as I cannot get it to fail as you are seeing.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHope it will work! I share the file.
As you can see each product has a inventory entry date and a inventory relased date. With this visual I want to see our inventory of product on a specific date. Thats the reason of date columns in some formula.
Thanks
https://www.dropbox.com/s/fcq0lxp4suftkxi/TestDate.pbix?dl=0
What are you expecting? In the first row, STate <> 6, so it gives you the gross amount - net * 1.08
In the other rows, State = 6, so it gives you the net.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSorry, in the first row the result is good but not in the total at the bottom. I got the same error when I use card visual for the total.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.