Forum Discussion

bdehning's avatar
bdehning
Post Prodigy
2 years ago
Solved

Clustered Column Visual

I have the following visual which uses filter  It is set less than 4

Top 3 by frequency  =  
IF (
    ISBLANK ( [Count of Total Gross Incurred] ),
    BLANK (),
    RANKX ( ALL ( InjuryCause[Cause Grouping] ), [Ref],, DESC, SKIP ))
 
and also uses measure Top N where Top is 3
 
Sort measure Count Tenure Cause =
VAR _FreqByPolicyYear = CALCULATE([Count of Total Gross Incurred], FILTER(ALL(InjuryCause[Cause Grouping]), [Top 3 by frequency]<4))
VAR _LN = LEN(FORMAT(CALCULATE([Count of Total Gross Incurred], ALL('LossRun'[LOE 2023])), "text"))
VAR _Pre = _FreqByPolicyYear *POWER(10, _LN*2)
VAR _Inc = CALCULATE(RANKX(ALLSELECTED(LossRun[LOE 2023]), [Count of Total Gross Incurred],,ASC,Dense), ALLSELECTED(InjuryCause[Cause Grouping]))
VAR _Mid = _Inc * POWER(10, _LN)
RETURN
IF(ISBLANK([Count of Total Gross Incurred]), BLANK(), _Pre + _Mid + RANKX(ALLSELECTED(InjuryCause[Cause Grouping]),[Ref],,ASC,Skip))
 
How do I eliminate the blank column showing for 1 yr.? 
 
I assume because it leaves space for the Strain Blue column the others have ones have but for 1 yr, strain is not in top 3.     
 

 

 

 

 

  • I solved the issue by adding both Cause and LOE to my X-Axis.  

11 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi bdehning ,

    Regarding your question, I think there may be a problem with the ranking, I created the measure and calculated columns and they both show 1.

    You can try modifying it in this format

    If I understand you wrong, can you share your .pbix file without sensitive data?

    • bdehning's avatar
      bdehning
      Post Prodigy

      Hard to share file, which part did you modify with your Rank=?  Was it the Top 3 By Frequency or the Sort Measure?   

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi bdehning ,

        I think we should change it here.

        Assuming that the column 'Cause Grouping' has the values 'No Data','<1yr','yr', and you have cleared the filtering capability of the field using the ALL function, the 'Ref values should all be the same, for sorting all are 1