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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
admin11
Memorable Member
Memorable Member

How to make my P&L report table display category ?

Hi All

 

I have below PBI file from @VijayP  working fine , it can display category field :-

https://www.dropbox.com/s/8fepay89fpt0sl6/P%26L%20Vijay%20ver03%20TDS%20working%20COPY_9.pbix?dl=0

Above link is the PBI file.

admin11_0-1613252111882.png

I try to duplicate the above PBI file by myself but it cannot display Category field  :-

https://www.dropbox.com/s/6mwb6dj3bymwd0p/P%26L%20Vijay%20ver04%20TDS%20not%20working%20COPY%209.pbi...

Above link is the PBI file :-

admin11_1-1613252249056.png

 

Can some one share where go wrong ?

 

Paul 

 

2 ACCEPTED SOLUTIONS
nandic
Super User
Super User

Hi @admin11 ,

This measure is not the same in the files.

In original file:

Total Profit_ =
VAR Revenue = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Revenue")*-1
VAR Expenses = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Expenses")*-1
Return
Revenue+Expenses
When i paste same logic to new file, it displays categories.
Make sure all measure have same calculations.
 
Regards,
Nemanja Andic

View solution in original post

Hi Paul,
If the structure of the files is the same, then the reason must be calculated columns or measures.
In most cases measures are the ones that "carry" the logic and they define filters and whether something should be displayed or not.
So main focus was on comparing measures. Luckily, there weren't too many measures so it took couple of minutes to check.

Furthermore, if there were more measures and they have lots of lines, here is a nice online tool to quickly compare queries / code: https://www.diffchecker.com/diff 

Regards,
Nemanja Andic

View solution in original post

4 REPLIES 4
nandic
Super User
Super User

Hi @admin11 ,

This measure is not the same in the files.

In original file:

Total Profit_ =
VAR Revenue = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Revenue")*-1
VAR Expenses = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Expenses")*-1
Return
Revenue+Expenses
When i paste same logic to new file, it displays categories.
Make sure all measure have same calculations.
 
Regards,
Nemanja Andic

@nandic 

Thank you for sharing ,  wow you are very smart. Can you pls share how can you spot the error in just few minute ?

 

org :-

Total Profit_ =
VAR Revenue = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Revenue")*-1
VAR Expenses = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Type]="Expenses")*-1
Return
Revenue+Expenses

not working :-
Total Profit_2 =
VAR Revenue = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Category]="Revenue")*-1
VAR Expenses = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Category]="Expenses")*-1
Return
Revenue+Expenses

 

 Can you share with me please.

 

Paul

Hi Paul,
If the structure of the files is the same, then the reason must be calculated columns or measures.
In most cases measures are the ones that "carry" the logic and they define filters and whether something should be displayed or not.
So main focus was on comparing measures. Luckily, there weren't too many measures so it took couple of minutes to check.

Furthermore, if there were more measures and they have lots of lines, here is a nice online tool to quickly compare queries / code: https://www.diffchecker.com/diff 

Regards,
Nemanja Andic

@nandic 

Okay Thank you very much , need to understand the data model. 

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.