admin管理员组

文章数量:1122846

I have a matrix in power bi that needs to calculate each event as a percentage of the opening event this is being done by the measures

    OpeningEventIDs = CALCULATE(SUM(Sheet1[UserCount]), Sheet1[StepName] = "Opening Event")

    %OfOpeningEvent = DIVIDE(SUM(Sheet1[UserCount]), [OpeningEventIDs])

The values need to also be dynamic to the slicer "Colour name" so to recalculate the "Opening Event" each time

I am then trying to reorder the columns so that Opening Event is first, they have been assigned a number each and i am doing this by the "Sort by column" feature, this then breaks the table, i have included two images the first has the correct values but wrong column order, the second is after sorting by column, the correct outcome should be the same values but with opening event as the first column

Correct Values, Wrong Order

Wrong Values, Correct Order

data

I have a matrix in power bi that needs to calculate each event as a percentage of the opening event this is being done by the measures

    OpeningEventIDs = CALCULATE(SUM(Sheet1[UserCount]), Sheet1[StepName] = "Opening Event")

    %OfOpeningEvent = DIVIDE(SUM(Sheet1[UserCount]), [OpeningEventIDs])

The values need to also be dynamic to the slicer "Colour name" so to recalculate the "Opening Event" each time

I am then trying to reorder the columns so that Opening Event is first, they have been assigned a number each and i am doing this by the "Sort by column" feature, this then breaks the table, i have included two images the first has the correct values but wrong column order, the second is after sorting by column, the correct outcome should be the same values but with opening event as the first column

Correct Values, Wrong Order

Wrong Values, Correct Order

data

Share Improve this question asked Nov 22, 2024 at 0:33 KRGKRG 1
Add a comment  | 

1 Answer 1

Reset to default 0

you can create a new table which includes step name and sort column

then create the relationship between your data table and this new table

then sort the step name column by sort column

in the matrix visual, drag the step name from the new table to the column field, then you will get the correct order.

本文标签: powerbiOrdering columns In a Power BI matrix by column not in matrixStack Overflow