Forum Discussion

ajaffeeattmz's avatar
ajaffeeattmz
Frequent Visitor
1 year ago
Solved

Count Shipments with Multiple Sources

I am trying to use DAX to determine from a table with tracking messages which shipments have multiple sources and what percentage of the total shipments have multiple sources.  There is not a row in...
  • Greg_Deckler's avatar
    1 year ago

    ajaffeeattmz Try this:

    Measure = 
      VAR __Table = SUMMARIZE( 'Table', [Shipment], "__Count", COUNTROWS( 'Table' ) )
      VAR __TotalCount = COUNTROWS( __Table )
      VAR __CountMultiple = COUNTROWS( FILTER( __Table, [__Count] > 1 ) )
      VAR __Result = DIVIDE( __CountMultiple, __TotalCount )
    RETURN
      __Result