Forum Discussion

Andreas_Wacker's avatar
Andreas_Wacker
Frequent Visitor
5 years ago
Solved

Creating bar chart total visits with dynamic distinct count

Hello all, a task that seems simple at first sight gets more complicated with every hour I spend trying, reading and thinking about it. If there is already a post about this, I didn't notice it be...
  • Jihwan_Kim's avatar
    5 years ago

     

    Customers Count : =
    VAR _currentvisitcount =
    MAX ( 'Visit Count'[Visit Count] )
    VAR _customersvisitcount =
    FILTER (
    ADDCOLUMNS (
    SUMMARIZE ( Data, Customers[Customer_ID] ),
    "@visitcount", CALCULATE ( COUNTROWS ( Data ) )
    ),
    [@visitcount] = _currentvisitcount
    )
    RETURN
    COUNTROWS ( _customersvisitcount )

     

     

    Link to the sample pbix file