Forum Discussion
Circular dependency - Odd table
- 2 years ago
It's better to 'show' what you're doing rather than explain it in words (sometimes both are required). A small test data sample with the DAX for the calculated columns.
--
The error message says - CSV[Column] depends on CSV[Out] which depends on CSV[Column]. There might be no explicit connection between these two to the untrained eye but powerbi sees a connection.
Let's look at the column code you have provided:
Out = calculate(sum(CSV[A Out]) + sum(CSV[B Out]) + sum(CSV[C Out]) + sum(CSV[D Out]) + sum(CSV[E Out]) + sum(CSV[F Out]) + sum(CSV[G Out]) + sum(CSV[H Out]) + sum(CSV[I Out]))
This looks like it could be done simpler. Why is the calculate there? Is the SUM keyword required? Can you show what you are trying to do here (with an example) please?
It's better to 'show' what you're doing rather than explain it in words (sometimes both are required). A small test data sample with the DAX for the calculated columns.
--
The error message says - CSV[Column] depends on CSV[Out] which depends on CSV[Column]. There might be no explicit connection between these two to the untrained eye but powerbi sees a connection.
Let's look at the column code you have provided:
Out = calculate(sum(CSV[A Out]) + sum(CSV[B Out]) + sum(CSV[C Out]) + sum(CSV[D Out]) + sum(CSV[E Out]) + sum(CSV[F Out]) + sum(CSV[G Out]) + sum(CSV[H Out]) + sum(CSV[I Out]))
This looks like it could be done simpler. Why is the calculate there? Is the SUM keyword required? Can you show what you are trying to do here (with an example) please?
- KronaH2 years agoRegular Visitor
Thanks,
I understand, it would really help to be able to show and tell to help explain, however a little bit of delicate data to be able to show the exact table.
That is why I tried the written explanation, to get through without showing too much.
As I have mentioned I think the type of data I have to start with is a bit unusual to handle in Power BI.
It is not the regular sales type of data which is used in most examples.
Rows contain data of moves; date and time values for interactions, as well as from and to positions of very many variables. To be able to define move types I use the logic described:
Adding a new column with this formula per move type, either picking from the to and from positions.
A In = IF(Find("A",CSV[From Position],1,0)>0,1,0)
This gives a table with a lot of columns with many zeros but only one value of 1 for each the to-move and from-move in the row. Since date-time values are also there I can see how many of each type happens within the period I am looking for.
I then present this in a table, but would like to also get a summary of "A in" + "B in" as well as "A Out + "B out" to get an overview of totals in and out.The sum is used to get all values of the move type aggregated to the date.
I could find no other way of selecting multiple columns and adding them up that was accepted.
Very open for ideas of how to achieve in a better way.
I am sorry not being able to explain better. All else is fine in the file so I might just have to calculate what I am after manually.