Forum Discussion

SushmaReddy's avatar
SushmaReddy
Icon for Helper I rankHelper I
4 years ago
Solved

DAX Tip

Hi Team,

I created a calculated Column using the below mentioned logic and getting correct output.

C1 = RANKX(T1,CONCATENATE(T1[Processing Date],T1[Version or Model Number] &Single_Material[Status]))

The problem is it is displaying "blank" if there are no records where i want to display "0".Please help me to fix the issue.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi SushmaReddy ,

     

    Glad to know that!😀

    please kindly Accept it as the solution to make the thread closed. More people will benefit from it.

     

    Best Regards,
    Eyelyn Qin

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try This
    C1 =
    VAR  _c1 =
      RANKX(T1,CONCATENATE(T1[Processing Date],T1[Version or Model Number] &Single_Material[Status]))
    VAR RESULT =
      IF(_c1=Blank,0,_c1)
    RETURN RESULT

  • Hi...I am happy for your immediate response but the issue is still same...

    Blank is still displaying in the visual.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SushmaReddy ,

     

    Please try to add +0 in the end to replace the blank value:

     

    C1 = RANKX(T1,CONCATENATE(T1[Processing Date],T1[Version or Model Number] &Single_Material[Status]))+0

     

     

    If the issue still exist, please provide more details about your table or share your pbix file after removing sensitive data to help us clarify your scenario.

     

    How to provide sample data in the Power BI Forum - Microsoft Power BI Community

    How to Get Your Question Answered Quickly - Microsoft Power BI Community

     

     

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SushmaReddy ,

     

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Best Regards,
    Eyelyn Qin

    • SushmaReddy's avatar
      SushmaReddy
      Icon for Helper I rankHelper I

      Hi Eyelyn Qin,

          I have used different logic as shown

       Processing Details =

      CONCATENATE(T1[Processing Date & Time],T1[Version or Model Number] &T1[Status])
      and use this logic in a Measure as shown below where i got "0" instead of "Blank".
      Processing Data = DISTINCTCOUNT(T1[Processing Details])+0
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SushmaReddy ,

     

    So...if your issue has been resolved or not?

     

    Best Regards,
    Eyelyn Qin

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SushmaReddy ,

     

    Glad to know that!😀

    please kindly Accept it as the solution to make the thread closed. More people will benefit from it.

     

    Best Regards,
    Eyelyn Qin