Forum Discussion
total curve on graph
- Anonymous3 years ago
Hi chestercas ,
You can use SELECTCOLUMNS() or ADDCOLUMNS() to create multiple tables containing only dates, values, and categories in three columns. Then create a table with all the dates, add a column with the category "total" and a column with the total values of the other categories, and use the UNION() function to create a new table with all the data, placing the date column of the new table on the x-axis, the values on the y-axis, and the categories on the [legend].
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi chestercas ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a table.
Table 2 =
var _table1=SELECTCOLUMNS('Table',"date",'Table'[date],"zone",'Table'[zone],"value",'Table'[value])
var _table2=ADDCOLUMNS(VALUES('Table'[date]),"zone","total","value",CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]=EARLIER('Table'[date]))))
return UNION(_table1,_table2)
(3) Then the result is as follows.
You can add the desired auxiliary lines under the [Analysis] pane.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanks for your answer, and i'm sorry , i realised that I don't give precisions on table ...
My "value" is on a different table
DATA_BRMC = is my table with all my data (zone, dates, value of different item). I can't use the value of this table on the curve because all values of that table need to be calculated (on the "mesures" table)
Dates, = I made a date table (in relation with data_BRMC)
mesures = all my calcul with the DATA_BRMC value. In my curve, I only use measure of that table.
Table2= Try the test with UNION function.
The rest is not use in this case. (mesures TTL/Phy , transfert, new reit)
Actualy, My curve graph used :
Dates = from the date table
Zone = from "DATA_BRMC"
Values = on "mesures" table
In tried your example but I think it doestn't work because values are not on the same table ...? (I have empty value, and I want one value per day to make my curve )
Thanks for your help.
If i'm misunderstood, i will work on a pbi file example for you, but it's hard to show you without show sensitive data...
Thank you !
- Anonymous3 years agoNot applicable
Hi chestercas ,
You can use SELECTCOLUMNS() or ADDCOLUMNS() to create multiple tables containing only dates, values, and categories in three columns. Then create a table with all the dates, add a column with the category "total" and a column with the total values of the other categories, and use the UNION() function to create a new table with all the data, placing the date column of the new table on the x-axis, the values on the y-axis, and the categories on the [legend].
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- chestercas3 years ago
Helper I
Thanks for your help !!! that's perfect !