Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
chestercas
Helper I
Helper I

total curve on graph

Hi,

 

I have a curve graph who show the evolution of each zone (Sud, Est,Nord...). But I want a curve with the total value (nord+sud+est...) on the same graph.
I made group, doesn't work... Tried with measures, doesn't work to...
Is it possible on power BI ?

(And other question : it is possible to add the 2 tendances curves on the legend ? (Dotted Orange and red)

PBI.PNG


Thanks for your help !! 🙂

chestercas

1 ACCEPTED SOLUTION

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. 

View solution in original post

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @chestercas ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1689228183121.png

(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.

vtangjiemsft_1-1689228241999.png

You can add the desired auxiliary lines under the [Analysis] pane.

vtangjiemsft_2-1689228336173.png

 

 

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

table.PNG

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 )

PBI2.PNG

 

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 !

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. 

Thanks for your help !!! that's perfect !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.