Forum Discussion

TJacobs's avatar
TJacobs
Frequent Visitor
8 years ago
Solved

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? :) 

 

3 Replies

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

  • TJacobs's avatar
    TJacobs
    Frequent Visitor

    Already found the solution, thanks for you help. 

    • v-yulgu-msft's avatar
      v-yulgu-msft
      Icon for Microsoft Employee rankMicrosoft Employee

      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