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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
gladies123
Helper I
Helper I

Reg:To display a serial number in table visual

Hi,

Kindly provide a solution to create serial no based on the v_ret_result and count of v_iden_no.

i have used following measure

indx_msr = RANKX(ALLSELECTED(cxsurrender[V_RET_RESULT]),CALCULATE(SUM(cxsurrender[Index])),,DESC,Dense) but it returns 1 in the total and it doesn't sort as per count.

 

gladies123_0-1635253488518.png

thanks,

gladis

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

Hi, @gladies123 

 

Since your SUM function is not calculated based on the count of v_iden_no column, you are not getting the correct sort.
Also, if your count column is aggregated data, then you may need to modify the formula to change the SUM function to a Count function, like the following.

vangzhengmsft_0-1635472906484.png

 

If you do not want to display the total value, one way is to turn off the total, and the other way is to modify the measure. As @YukiK  mentioned above.

measure would be like this:

_indx =
IF (
    HASONEVALUE ( 'Table'[Count of V. _IDEN_ NO] ),
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( COUNT ( 'Table'[Count of V. _IDEN_ NO] ) ),
        ,
        DESC,
        DENSE
    )
)

 

 The display result might look like this:

vangzhengmsft_1-1635473068732.png

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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-angzheng-msft
Community Support
Community Support

Hi, @gladies123 

 

Since your SUM function is not calculated based on the count of v_iden_no column, you are not getting the correct sort.
Also, if your count column is aggregated data, then you may need to modify the formula to change the SUM function to a Count function, like the following.

vangzhengmsft_0-1635472906484.png

 

If you do not want to display the total value, one way is to turn off the total, and the other way is to modify the measure. As @YukiK  mentioned above.

measure would be like this:

_indx =
IF (
    HASONEVALUE ( 'Table'[Count of V. _IDEN_ NO] ),
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( COUNT ( 'Table'[Count of V. _IDEN_ NO] ) ),
        ,
        DESC,
        DENSE
    )
)

 

 The display result might look like this:

vangzhengmsft_1-1635473068732.png

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

YukiK
Impactful Individual
Impactful Individual

You can hide totals in the visual settings or use something like:

MeasureToDisplay=IF(HASONVALUE([ColumnOfTotal],[Measure],BLANK())

Can you show your underlying table? So we can see what's going on.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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