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

P&L Table unable to sort on first column.

Hi All

 

Many thank to @Icey

help me create a P&L report for below post. 

https://community.powerbi.com/t5/Desktop/How-to-combine-my-Expense-Table-with-my-P-amp-L-Table-into-...

 

Now my issue is the P&L table first column is not sort correctly. Hope some one can advise me how to do it ? As i have create a P&L table which is able to sort correctly , appear on the left side.

admin11_0-1620428515656.png

My PBI sample file :-

https://www.dropbox.com/s/b7aku29v8giacil/PBT_V2021_400%20GL_TI.pbix?dl=0

 

Paul

 

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @admin11 ,

 

This problem occurs because you did not create a relationship between the two tables, please refer to the file I provided.
(Your .pbxi file is too big, my computer is very difficult to run, so no screenshots are provided.)

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
v-lionel-msft
Community Support
Community Support

Hi @admin11 ,

 

This problem occurs because you did not create a relationship between the two tables, please refer to the file I provided.
(Your .pbxi file is too big, my computer is very difficult to run, so no screenshots are provided.)

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-lionel-msft 

Thank you very much , it work fine now.

Paul Yeo

v-lionel-msft
Community Support
Community Support

Hi @admin11 ,

 

Please refer to the .pbix file.

v-lionel-msft_0-1620895046889.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lionel-msft 

i have open and check the file attachment , it work as per i request. when i copy the table to my PBI file , i get the table return all zero.

admin11_0-1620898409661.png

Very sorry can you explan a bit more detail the step 1 , so that i can understand what you did.

 

Paul

v-lionel-msft
Community Support
Community Support

Hi @admin11 ,

 

Try to do like this.

1, Create a calculated column in 'GL' table.

 

Column = 
LOOKUPVALUE( GL_Table_EXP[Sort Order], GL_Table_EXP[REC&COGS], GL[REV&COGS&OTH&EXP] )

 

2, Sort the GL[REV&COGS&OTH&EXP] column by the created column in step1.

 

Or try this way.

Create a 1:* relationship between 'GL' table and 'GL_Table_EXP' table with GL_Table_EXP[REC&COGS] column and GL[REV&COGS&OTH&EXP] column. And then add the GL_Table_EXP[REC&COGS] (instead of GL[REV&COGS&OTH&EXP]) to the matrix .

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lionel-msft 

Thank you very much for sharing.

For the Option 1 solution. it is possible to share the working PBI file with me , so that i can understand what you mean. As when i create the Column , i get error msg.

Paul

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.