Forum Discussion

sunah132's avatar
sunah132
Helper I
2 years ago
Solved

count rows as subtotal

Hi, I'm building a report that would have count rows as subtotal, not the actual sum of the values during the date period. From current view to count distinct row view, how can I manipulate to have t...
  • bhanu_gautam's avatar
    2 years ago

    sunah132 , You need to create a measure that calculates the number of days with orders for each id

     

    OrderedDays =
    CALCULATE(
    COUNTROWS(
    FILTER(
    SUMMARIZE(
    TableName,
    TableName[ID],
    TableName[DateColumn],
    "OrderCount", SUM(TableName[OrderCount])
    ),
    [OrderCount] > 0
    )
    )
    )

     

    I have attached PBIX with your sample data