cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
blander Frequent Visitor
Frequent Visitor

Difference between column and calculated column

Hi all,

 

I recently started working with PowerBI and I have quite a basic question which I can't seem to figure out. 

 

For the data validation part of a report, I want to create a differenced column between

1) the amount of lines per table

2) the amount of lines in my log.

 

The data looks like this:

 

Imported_Records table

Table   Records

ADRP   106777

AFKO   3565

AFPO   3565

AUFK   308469

...         ...

 

Download_logging table

Table   Amount of lines in log

ADRP  202556

ADRP  0

BSEG   1000000

BSEG   181149

...         ...

I created a many to one link from the logging table to the imported records table on the table variable. In a matrix, I'm able to visualise the records next to the sum of amount of lines per table, but I also want to calculate the difference between the records and the summed amount of lines per table from the download logging table in this visualisation. Is this possible?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-sihou-msft
Moderator

Re: Difference between column and calculated column

@blander

 

In this scenario, you can go to Quert Editor, group the records in log table on Table Name column, and new a column to sum the "Amount of lines in log" together.

 

Capture.PNG

 

Capture2.PNG

 

Then your "Imported_Records table" and above table should be one-to-one relationship. You can directly create a calculated column to get the difference of two Records columns.

 

Regards,

2 REPLIES 2
Moderator v-sihou-msft
Moderator

Re: Difference between column and calculated column

@blander

 

In this scenario, you can go to Quert Editor, group the records in log table on Table Name column, and new a column to sum the "Amount of lines in log" together.

 

Capture.PNG

 

Capture2.PNG

 

Then your "Imported_Records table" and above table should be one-to-one relationship. You can directly create a calculated column to get the difference of two Records columns.

 

Regards,

blander Frequent Visitor
Frequent Visitor

Re: Difference between column and calculated column

That helps, thanks a lot!