March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hi, i have created two calculated column in a table.
Now i want to multiply those values, but i get a circular error.
It is a simple Price * Quantity multiplication, where the values in the row needs to be multiplied.
What can i do to get the output in column result?
table1:
Price(calculated) Quantity(calculated) result (calculated)
1 10 10
2 11 22
3 12 36
4 13 52
5 14 70
JohnD2
Solved! Go to Solution.
Would you mind sharing the formulas used to calculate Price and Quantity? Multiplying two calculated columns should not give you an error by itself.
In any case, you can try using variables for the Result column, like so:
Result = VAR PriceVar = (your Price column formula goes here) VAR QuantityVar = (your Quantity column formula goes here) RETURN PriceVar * QuantityVar
This way, the Result column will not depend on either Quantity or Price columns, so if you don't strictly need them, you can get rid of them and save memory.
@JohnD2 - do you really need it to be a calculated column? what happens if just calculate as a measure instead like measure = SUMX( tablename, tablename[Price] * tablename[Quantity]) ?
I'm very new to PowerBi and I'm self-learning. I think I have a similar issue and I don't know how to solve it.
I have a table of data. My first column is a date and then I have created a column "Num of groups" that uses the formula DISTINCTCOUNT because I wanted to count how many groups I have for the same date. This works.
Then, I created another column "Num of students per group" in which I used the formula IF to get a specific number based on the date in my first column.
Now, I need to multiply the column "Num of groups" by "Num of students per group". However, the data I'm getting in each row is not that but the multiplication of the number of rows that have my original table of data for the "Num of groups" by the "Num of students per group". What it is failing is the "Num of groups". This is my formula:
@JohnD2 - do you really need it to be a calculated column? what happens if just calculate as a measure instead like measure = SUMX( tablename, tablename[Price] * tablename[Quantity]) ?
Would you mind sharing the formulas used to calculate Price and Quantity? Multiplying two calculated columns should not give you an error by itself.
In any case, you can try using variables for the Result column, like so:
Result = VAR PriceVar = (your Price column formula goes here) VAR QuantityVar = (your Quantity column formula goes here) RETURN PriceVar * QuantityVar
This way, the Result column will not depend on either Quantity or Price columns, so if you don't strictly need them, you can get rid of them and save memory.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
90 | |
89 | |
85 | |
73 | |
49 |
User | Count |
---|---|
167 | |
149 | |
93 | |
72 | |
58 |