Forum Discussion

nataliesmiy1357's avatar
1 year ago
Solved

Divide columns

I need a bit help with a percentage!

 

I have a column with the formula: 

No Read Count = CALCULATE(COUNTA(Passing_History[Pallet_Name]), Passing_History[Pallet_Name] = "No Data")
 
I also have a column called Pallet_Name that has each rows name - I have a card that I count these in.
 
I need to create a formula of:
No Read Count / Total Number of Pallets
 
But I need this formula to modify with the date filter.  
 
How do I do this?
 
  • nataliesmiy1357 , First create a measure

    Create the "No Read Count" measure:

    No Read Count = CALCULATE(COUNTA(Passing_History[Pallet_Name]), Passing_History[Pallet_Name] = "No Data")

     

    Then Create one more

    Total Number of Pallets = COUNTA(Passing_History[Pallet_Name])

     

    Create one for percentage 

    No Read Percentage = DIVIDE([No Read Count], [Total Number of Pallets], 0)

     

    All the measures created above will automatically respect any date filters applied in your Power BI report, as long as the date filter is applied to the same table or related tables.

     

3 Replies

  • nataliesmiy1357 , First create a measure

    Create the "No Read Count" measure:

    No Read Count = CALCULATE(COUNTA(Passing_History[Pallet_Name]), Passing_History[Pallet_Name] = "No Data")

     

    Then Create one more

    Total Number of Pallets = COUNTA(Passing_History[Pallet_Name])

     

    Create one for percentage 

    No Read Percentage = DIVIDE([No Read Count], [Total Number of Pallets], 0)

     

    All the measures created above will automatically respect any date filters applied in your Power BI report, as long as the date filter is applied to the same table or related tables.

     

    • nataliesmiy1357's avatar
      nataliesmiy1357
      Helper IV

      Thank you!  Looks like those counts for No Read Count and Total Number of Pallets work, but the Percentage didn't....