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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
admin11
Memorable Member
Memorable Member

How to make My Expression display 4 GL Code Amount instead of 2 ONLY ?

Hi All

 

I have below expression working fine :- 

Total Sales = CALCULATE(SUM(GL_TI[C/D]),Fin_Category[Summary]="SALES")*-1

 

it can Shown 4 GL code Capture at Table 2 Fin Category Table

 

admin11_0-1613552886356.png

 

I have below expression , which only display 2 GL Code , 2 GL Code is missing :-

 

Anuual Total_2 =
VAR Summary = SELECTEDVALUE(Format_PnL[Sub Category])
VAR Category =SELECTEDVALUE(Format_PnL[Category])
RETURN SWITCH(TRUE(),
SELECTEDVALUE(Format_PnL[Sub Category])="GENERAL & ADMIN EXP",[Expense On General & Admin Expense],
CALCULATE([Total Profit],FILTER(GL_TI,GL_TI[GL Description]=Category)))
admin11_0-1613553334059.png

 

Can some one share with me where go wrong ?
 
Below is my PBI file :-
 

Paul 

 

 

 

1 ACCEPTED SOLUTION

https://www.dropbox.com/s/qzgurlp8hrz6as5/GL_WORKING%20v017%20ask_6_.pbix?dl=0

manikumar34_5-1613625917022.png

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

3 REPLIES 3
manikumar34
Solution Sage
Solution Sage

@admin11 

Hi Paul, 

You need to chnage the relationship like the below. 

 

manikumar34_0-1613625592563.png

 

And use the below DAX

Anuual Total_2 =

CALCULATE(SUM(GL_TI[C/D]),Format_PnL_[Summary]="SALES")*-1
 
Regards, 
Manikumar




If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




https://www.dropbox.com/s/qzgurlp8hrz6as5/GL_WORKING%20v017%20ask_6_.pbix?dl=0

manikumar34_5-1613625917022.png

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




manikumar34
Solution Sage
Solution Sage

@admin11 

Hi Paul,

 

You are getting only 2 rows on your second table beacuse you have filtered _REV to only REV. If you remove the filter, you will get many rows on the table.

manikumar34_0-1613620721048.png

 

Regards, 

Manikumar

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.