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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
TJacobs
Frequent Visitor

DAX query for calculating column

Hi all,

 

Apologies in advance if this has been answered before.

 

But I want to create a powerbi which shows three different line charts:

1; line chart with turnover

2; line chart with costs

3; line chart with result (turnover minus the costs)

 

to create those line charts I have three different coloms in my table:

1; column which tells you ''sales'' and ''costs''

2; column with the figures (postive and negative) (Result)

3; column with 0's and 1's telling you that 0=costs/1=sales (RowType)

 

So I already created the first two line charts by adding an filter on visual level. So the turnover line chart shows figures when RowType is 1 and the costs line chart is showing data when RowType is 0. But now I have to create the third line chart which shows the results, so turnover minus the costs. Problably I have to create an new measure or column for that, but I don't know how...

 

Could somebody explain me how to fix this? 🙂 

 

1 ACCEPTED SOLUTION
TJacobs
Frequent Visitor

Already found the solution, thanks for you help. 

View solution in original post

3 REPLIES 3
TJacobs
Frequent Visitor

Already found the solution, thanks for you help. 

Hi @TJacobs,

 

Glad to hear that you have resolved it by yourself. Would you please share your solution so that it can benefit more users?

 

Thanks,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RolandsP
Resolver IV
Resolver IV

It should be simply difference between first two measures if they are defined correctly (Turnover - Costs)

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.