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
Anonymous
Not applicable

Cannot move calculated column in matrix

30-07-2019 11-17-36.png

 

Hi,

I have a matrix displaying production data as is shown in the uploaded screenshot. 

The outstanding quantity column is a calculated field and ideally I want it placed after the status total column but I cannot see a way of doing it. The outstanding quantity is row data and I read that what I need to do is change the pivot from row to column but when I go into power query editor to pivot the column, the column is not there. Is that because it is calculated and if so how would I get round this? When I tried to  add a custom column and pasted in the code that I used for the calculated column it errored. This is the code i used

Outstanding Quantity = Query1[JobQty] - CALCULATE (
    COUNT ( 'Query1'[Status]),
    ALLEXCEPT ( 'Query1', 'Query1'[JobNumber] ))

Can someone point me in the right direction?

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

hi, @Anonymous 

It couldn't be achieved that move the column place after [total] column in power bi for now. It could only be adjusted in "attribute" area.

and for second question, The calculate column couldn't appear in Edit Queries. Because Calculate column is based on DAX language and data model, but column in Edit Queries is based on M language and data soure.

https://radacad.com/m-or-dax-that-is-the-question

 

If you still want to pivot it, you could use same logic create a custom column in edit queries then pivot.

 

Best Regards,

Lin

 

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

It couldn't be achieved that move the column place after [total] column in power bi for now. It could only be adjusted in "attribute" area.

and for second question, The calculate column couldn't appear in Edit Queries. Because Calculate column is based on DAX language and data model, but column in Edit Queries is based on M language and data soure.

https://radacad.com/m-or-dax-that-is-the-question

 

If you still want to pivot it, you could use same logic create a custom column in edit queries then pivot.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ibarrau
Super User
Super User

Hi. I think that you will complicate your model for this. I usually say no to this kind of things, because you allready have what you need there.

Anyway, the only way to have that value at the end, is if you remove all data columns from the matrix and add measures for any columns you want. E.g. Measure for F values, R values... for Status total and finally for Outstanding Quantity.

 

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


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

Happy to help!

LaDataWeb Blog

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.