Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to calculate without blank

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hello null values usually dont show on visulas and dont get calculated, so im guessing you changed null to a space or empty column? when you have the type of the column as text, blank will be used as a space like so if thats the case then just filter out the "blank" by doing this 

    Countof = CALCULATE(COUNT(ETA_Table[ETA Grouping]),FILTER(ETA_Table,ETA_Table[ETA Grouping]<>""))
  • Anonymous's avatar
    Anonymous
    3 years ago

    kindly use this measure:

    perc = [Count ETA]/CALCULATE(COUNT(Table2[ETA Grouping]),FILTER(ALL(Table2),Table2[ETA Grouping]<>""))

     

     by the way great work on design just peice of advice, try to create a metric table and put all your measures in it, its easier and more organized you can do that by clicking on "Enter data" tab and just naming the table metrics and after that add metrics to it and you can delete the blnak column

14 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Dear eliasayy,

    Thank so much for you kind, help and attention.
    My problem solved. 



    Again, thank you.
    Prima Indonesia

  • Anonymous's avatar
    Anonymous
    Not applicable

    Dear all,

    I am using Power BI Desktop, update September 2022. 
    I need to know how many line of oustanding items that will delivered within this week, next week, next 3 weeks, ans so on. 
    I group them into:
    1w
    2w
    3w
    No PO (purchase order)

    But in this column, I have also blank value, which is if the material already received. 

    How do I calculate ignoring blank, I don't want the blank visualize. 

    Thank you very much.
    Prima Indonesia

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello null values usually dont show on visulas and dont get calculated, so im guessing you changed null to a space or empty column? when you have the type of the column as text, blank will be used as a space like so if thats the case then just filter out the "blank" by doing this 

      Countof = CALCULATE(COUNT(ETA_Table[ETA Grouping]),FILTER(ETA_Table,ETA_Table[ETA Grouping]<>""))
      • Anonymous's avatar
        Anonymous
        Not applicable

        Dear eliasayy,

        The solution given to me working well, but then how do I get the percentage except/ignoring the blank?

        % ETAGroup = 
            [Count ETA]/CALCULATE([Count ETA],ALL(Table2[OWL Type]))


        With the above measure, it gave me the wrong result.

        And below measure based on your suggestion is working well. 

        Count ETA = 
        CALCULATE(COUNT(Table2[ETA Grouping]),FILTER(Table2,Table2[ETA Grouping]<>""))


        Thank you very much.
        Prima Indonesia


  • Anonymous's avatar
    Anonymous
    Not applicable

    Dear eliasayy,

    What kind of data sample do you want? is it Excel workbook or PBI file?

    Thank you
    Prima Indonesia

    • Anonymous's avatar
      Anonymous
      Not applicable

      anything will do i just need to see the data to know what you mean

      • Anonymous's avatar
        Anonymous
        Not applicable

        Dear eliasayy,

        Is it possible to upload the sample of Excel workbook (16KB or Power BI files (2MB) here. What is the icon should I use?

        Thank you
        Prima