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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
blander
Regular 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
v-sihou-msft
Employee
Employee

@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,

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
Employee

@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,

That helps, thanks a lot!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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