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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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